https://bugs.webkit.org/show_bug.cgi?id=194087
Basically GstFlowCombiner was mostly designed for element that have 1 sinkpad and several srcpad
meaning that it makes sense that when any of the downstream pad is returning flushing, you should
return FLUSHING upstream. But in our case we have several sinkpads and FLUSHING should be returned
*only* if the internally linked srcpad is FLUSHING otherwise we might end up setting the upstream
source element task to PAUSED (because downstream returned flushing) on a branch that was not
flushing!
Patch by Thibault Saunier <tsaunier@igalia.com> on 2019-01-31
Reviewed by Philippe Normand.
This is a theorical race we can't really cover with tests.
* platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
(WebCore::webkitMediaStreamSrcChain):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240782
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2019-01-31 Thibault Saunier <tsaunier@igalia.com>
+
+ [GStreamer][WebRTC] Avoid returning FLUSHING when it is not the case in GStreamerMediaStreamSource
+ https://bugs.webkit.org/show_bug.cgi?id=194087
+
+ Basically GstFlowCombiner was mostly designed for element that have 1 sinkpad and several srcpad
+ meaning that it makes sense that when any of the downstream pad is returning flushing, you should
+ return FLUSHING upstream. But in our case we have several sinkpads and FLUSHING should be returned
+ *only* if the internally linked srcpad is FLUSHING otherwise we might end up setting the upstream
+ source element task to PAUSED (because downstream returned flushing) on a branch that was not
+ flushing!
+
+ Reviewed by Philippe Normand.
+
+ This is a theorical race we can't really cover with tests.
+
+ * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
+ (WebCore::webkitMediaStreamSrcChain):
+
2019-01-31 Zalan Bujtas <zalan@apple.com>
[LFC] Margin before/after/start/end initial value is 0 and not auto.
2019-01-31 Zalan Bujtas <zalan@apple.com>
[LFC] Margin before/after/start/end initial value is 0 and not auto.
static GstFlowReturn webkitMediaStreamSrcChain(GstPad* pad, GstObject* parent, GstBuffer* buffer)
{
static GstFlowReturn webkitMediaStreamSrcChain(GstPad* pad, GstObject* parent, GstBuffer* buffer)
{
+ GstFlowReturn result, chain_result;
GRefPtr<WebKitMediaStreamSrc> self = adoptGRef(WEBKIT_MEDIA_STREAM_SRC(gst_object_get_parent(parent)));
GRefPtr<WebKitMediaStreamSrc> self = adoptGRef(WEBKIT_MEDIA_STREAM_SRC(gst_object_get_parent(parent)));
- result = gst_flow_combiner_update_pad_flow(self.get()->flowCombiner, pad,
- gst_proxy_pad_chain_default(pad, GST_OBJECT(self.get()), buffer));
+ chain_result = gst_proxy_pad_chain_default(pad, GST_OBJECT(self.get()), buffer);
+ result = gst_flow_combiner_update_pad_flow(self.get()->flowCombiner, pad, chain_result);
+
+ if (result == GST_FLOW_FLUSHING)
+ return chain_result;