diff options
author | Vincent Penquerc'h <ogg.k.ogg.k@googlemail.com> | 2011-10-01 14:30:07 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-10-03 10:36:35 +0200 |
commit | 12bb47343d970d7c4ceb625e30351fbba8db2c3e (patch) | |
tree | b4db8d52d097cd1f2ed6ff4e42b57213cc217fa5 /ext | |
parent | 46dd7941f32717f4fbd6dabe04fa3171de1c1d19 (diff) | |
download | gstreamer-plugins-bad-12bb47343d970d7c4ceb625e30351fbba8db2c3e.tar.gz |
kate: fix race condition on PAUSED->READY state change
https://bugzilla.gnome.org/show_bug.cgi?id=660630
Diffstat (limited to 'ext')
-rw-r--r-- | ext/kate/gstkatetiger.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/kate/gstkatetiger.c b/ext/kate/gstkatetiger.c index 41da4db15..ca02c912d 100644 --- a/ext/kate/gstkatetiger.c +++ b/ext/kate/gstkatetiger.c @@ -571,6 +571,12 @@ gst_kate_tiger_kate_chain (GstPad * pad, GstBuffer * buf) GST_LOG_OBJECT (tiger, "Got kate buffer, caps %" GST_PTR_FORMAT, GST_BUFFER_CAPS (buf)); + /* Now that we have the lock, check if we're flushing */ + if (tiger->decoder.kate_flushing) { + GST_DEBUG_OBJECT (tiger, "Flushing, disregarding buffer"); + goto done; + } + /* Unfortunately, it can happen that the start of the stream is not sent, for instance if there's a stream selector upstream, which is switched from another Kate stream. If this happens, then we can fallback on the @@ -663,6 +669,7 @@ gst_kate_tiger_kate_chain (GstPad * pad, GstBuffer * buf) } } +done: GST_KATE_TIGER_MUTEX_UNLOCK (tiger); gst_object_unref (tiger); |