diff options
author | Edward Hervey <edward@centricular.com> | 2015-11-06 19:31:47 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-11-07 19:28:05 +0100 |
commit | 04242fbe5ce805df7efd8ce6bf1a5db4280d0224 (patch) | |
tree | 27e32ac129d016db11f50f30ef628cd4837910cd | |
parent | 1213c918c521837891f143920c6b7ce4fe6a57d4 (diff) | |
download | gstreamer-plugins-base-04242fbe5ce805df7efd8ce6bf1a5db4280d0224.tar.gz |
decodebin: Properly deactivate ghostpads
Just setting the ghostpad as flushing wasn't enough. It needs to be
consistent on the internal proxypad also, otherwise you end up in
situations where:
* a pending buffer on the target pad triggers the sticky event
propagation
* the default implementation sees that the proxypad is not flushing,
so it tries to push it to the other pad (the actual ghostpad)
* the ghostpad is flushing, so returns FALSE
* the push_event function sees that pushing the event failed...
* ... and pending buffer push returns GST_FLOW_ERROR, instead of
GST_FLOW_FLUSHING
By using gst_pad_set_active(FALSE), we ensure that both the ghostpad
and the proxypad are flushing/deactivated. The situation above will
no longer occur, and a GST_FLOW_FLUSHING will be returned.
-rw-r--r-- | gst/playback/gstdecodebin2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 3afad0d1d..5f27c1d37 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -5122,7 +5122,7 @@ unblock_pads (GstDecodeBin * dbin) } dpad->blocked = FALSE; /* make flushing, prevent NOT_LINKED */ - GST_PAD_SET_FLUSHING (GST_PAD_CAST (dpad)); + gst_pad_set_active (GST_PAD_CAST (dpad), FALSE); gst_object_unref (dpad); gst_object_unref (opad); GST_DEBUG_OBJECT (dpad, "unblocked"); |