summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2013-05-15 14:47:53 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2013-05-15 14:47:53 +0200
commit83f247697670a163357d81ef78746ab2ebc02d6c (patch)
tree87f7a525213078820e749780ee337741e7e67e7f
parentaf24e238802112ae7072a8246a05c5df2ccfcc7c (diff)
decodebin: Hold the expose lock when freeing a chain
https://bugzilla.gnome.org/show_bug.cgi?id=700342
-rw-r--r--gst/playback/gstdecodebin2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c
index d2697c6de..c5c55ee44 100644
--- a/gst/playback/gstdecodebin2.c
+++ b/gst/playback/gstdecodebin2.c
@@ -4410,10 +4410,12 @@ gst_decode_bin_change_state (GstElement * element, GstStateChange transition)
break;
case GST_STATE_CHANGE_READY_TO_PAUSED:
/* Make sure we've cleared all existing chains */
+ EXPOSE_LOCK (dbin);
if (dbin->decode_chain) {
gst_decode_chain_free (dbin->decode_chain);
dbin->decode_chain = NULL;
}
+ EXPOSE_UNLOCK (dbin);
DYN_LOCK (dbin);
GST_LOG_OBJECT (dbin, "clearing shutdown flag");
dbin->shutdown = FALSE;
@@ -4446,10 +4448,12 @@ gst_decode_bin_change_state (GstElement * element, GstStateChange transition)
switch (transition) {
case GST_STATE_CHANGE_PAUSED_TO_READY:
do_async_done (dbin);
+ EXPOSE_LOCK (dbin);
if (dbin->decode_chain) {
gst_decode_chain_free (dbin->decode_chain);
dbin->decode_chain = NULL;
}
+ EXPOSE_UNLOCK (dbin);
break;
case GST_STATE_CHANGE_READY_TO_NULL:
default: