gst/flx/gstflxdec.c: Fix state change.

Original commit message from CVS:
* gst/flx/gstflxdec.c: (gst_flxdec_change_state):
Fix state change.
This commit is contained in:
Wim Taymans 2005-11-16 17:00:32 +00:00
parent 14e8166740
commit d94e691bee
3 changed files with 28 additions and 12 deletions

View file

@ -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.

2
common

@ -1 +1 @@
Subproject commit 657b549dfb640a76f3d7ab7676e453c801a83dca
Subproject commit 3aa0adc0cc4539ec9bb62ccf6d535240dad19e58

View file

@ -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;
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;
break;
case GST_STATE_CHANGE_READY_TO_NULL:
default:
break;
}
return parent_class->change_state (element, transition);
ret = parent_class->change_state (element, transition);
//return GST_STATE_CHANGE_SUCCESS;
switch (transition) {
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
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 ret;
}
static void