diff options
-rw-r--r-- | ChangeLog | 5 | ||||
m--------- | common | 0 | ||||
-rw-r--r-- | gst/flx/gstflxdec.c | 27 |
3 files changed, 24 insertions, 8 deletions
@@ -1,3 +1,8 @@ +2005-11-16 Wim Taymans <wim@fluendo.com> + + * gst/flx/gstflxdec.c: (gst_flxdec_change_state): + Fix state change. + 2005-11-16 Andy Wingo <wingo@pobox.com> * gst/udp/gstudpsrc.c: Clean up with the boilerplate macro. diff --git a/common b/common -Subproject 657b549dfb640a76f3d7ab7676e453c801a83dc +Subproject 3aa0adc0cc4539ec9bb62ccf6d535240dad19e5 diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c index 1d50a9c7..e3e4bcc8 100644 --- a/gst/flx/gstflxdec.c +++ b/gst/flx/gstflxdec.c @@ -598,6 +598,7 @@ static GstStateChangeReturn gst_flxdec_change_state (GstElement * element, GstStateChange transition) { GstFlxDec *flxdec; + GstStateChangeReturn ret; flxdec = GST_FLXDEC (element); @@ -610,21 +611,31 @@ gst_flxdec_change_state (GstElement * element, GstStateChange transition) break; case GST_STATE_CHANGE_PAUSED_TO_PLAYING: break; + default: + break; + } + + ret = parent_class->change_state (element, transition); + + switch (transition) { case GST_STATE_CHANGE_PLAYING_TO_PAUSED: break; case GST_STATE_CHANGE_PAUSED_TO_READY: - gst_buffer_unref (flxdec->frame); - flxdec->frame = NULL; - gst_buffer_unref (flxdec->delta); - flxdec->delta = NULL; + if (flxdec->frame) { + gst_buffer_unref (flxdec->frame); + flxdec->frame = NULL; + } + if (flxdec->delta) { + gst_buffer_unref (flxdec->delta); + flxdec->delta = NULL; + } break; case GST_STATE_CHANGE_READY_TO_NULL: break; + default: + break; } - - return parent_class->change_state (element, transition); - - //return GST_STATE_CHANGE_SUCCESS; + return ret; } static void |