2006-03-23 Tim-Philipp Müller <tim at centricular dot net>
+ * ext/libpng/gstpngdec.c: (gst_pngdec_change_state):
+ Make state change function thread-safe.
+
+2006-03-23 Tim-Philipp Müller <tim at centricular dot net>
+
* gst/wavparse/gstwavparse.c: (gst_wavparse_get_upstream_size),
(gst_wavparse_stream_headers), (gst_wavparse_stream_data):
Don't try to read beyond the end of the file just because
static GstStateChangeReturn
gst_pngdec_change_state (GstElement * element, GstStateChange transition)
{
- GstStateChangeReturn ret = GST_STATE_CHANGE_FAILURE;
- GstPngDec *pngdec = NULL;
+ GstStateChangeReturn ret;
+ GstPngDec *pngdec;
pngdec = GST_PNGDEC (element);
case GST_STATE_CHANGE_READY_TO_PAUSED:
gst_pngdec_libpng_init (pngdec);
break;
+ default:
+ break;
+ }
+
+ ret = parent_class->change_state (element, transition);
+ if (ret != GST_STATE_CHANGE_SUCCESS)
+ return ret;
+
+ switch (transition) {
case GST_STATE_CHANGE_PAUSED_TO_READY:
gst_pngdec_libpng_clear (pngdec);
break;
break;
}
- ret = parent_class->change_state (element, transition);
-
return ret;
}