mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
ext/libpng/gstpngdec.c: Make state change function thread-safe.
Original commit message from CVS: * ext/libpng/gstpngdec.c: (gst_pngdec_change_state): Make state change function thread-safe.
This commit is contained in:
parent
459333b3c0
commit
38c2bcc170
2 changed files with 16 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
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),
|
||||
|
|
|
@ -592,8 +592,8 @@ beach:
|
|||
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);
|
||||
|
||||
|
@ -601,6 +601,15 @@ gst_pngdec_change_state (GstElement * element, GstStateChange transition)
|
|||
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;
|
||||
|
@ -608,8 +617,6 @@ gst_pngdec_change_state (GstElement * element, GstStateChange transition)
|
|||
break;
|
||||
}
|
||||
|
||||
ret = parent_class->change_state (element, transition);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue