summaryrefslogtreecommitdiff
path: root/ext/mimic
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.co.uk>2009-07-20 22:13:11 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.co.uk>2009-07-22 15:58:02 -0400
commite8c8725efecd06b4adf7dc812c02481c837c5abc (patch)
tree1142d6f740fb8c2fa3354a274331822aef30fdfc /ext/mimic
parent22b95ab4cdbbac7cde1487abde5d57ea2c311e15 (diff)
downloadgstreamer-plugins-bad-e8c8725efecd06b4adf7dc812c02481c837c5abc.tar.gz
mimdec: Lock element before unlocking
Diffstat (limited to 'ext/mimic')
-rw-r--r--ext/mimic/gstmimdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/mimic/gstmimdec.c b/ext/mimic/gstmimdec.c
index 9cd2c36ce..a0878a136 100644
--- a/ext/mimic/gstmimdec.c
+++ b/ext/mimic/gstmimdec.c
@@ -333,6 +333,7 @@ gst_mimdec_change_state (GstElement * element, GstStateChange transition)
switch (transition) {
case GST_STATE_CHANGE_READY_TO_NULL:
+ GST_OBJECT_LOCK (element);
if (mimdec->dec != NULL) {
mimic_close (mimdec->dec);
mimdec->dec = NULL;
@@ -340,8 +341,8 @@ gst_mimdec_change_state (GstElement * element, GstStateChange transition)
mimdec->have_header = FALSE;
mimdec->payload_size = -1;
mimdec->current_ts = -1;
- GST_OBJECT_UNLOCK (element);
}
+ GST_OBJECT_UNLOCK (element);
break;
case GST_STATE_CHANGE_READY_TO_PAUSED:
GST_OBJECT_LOCK (element);