summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2015-11-06 19:31:47 +0100
committerEdward Hervey <bilboed@bilboed.com>2015-11-06 19:38:13 +0100
commitd0eface01c9af0ab1d61fe4916ca945ae0679af7 (patch)
tree836abc1f3ecc970636cbbee5f332ae43553a28f3
parentd2e210bbeabc2949740803ba4daa9265662e50d0 (diff)
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c
index ae6e7e0a0..99acb7796 100644
--- a/gst/playback/gstdecodebin2.c
+++ b/gst/playback/gstdecodebin2.c
@@ -5111,7 +5111,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");