[Webkit-unassigned] [Bug 256955] New: [GStreamer][MSE] Append pipeline can fail to handle multiple initialization segments

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 18 02:20:37 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=256955

            Bug ID: 256955
           Summary: [GStreamer][MSE] Append pipeline can fail to handle
                    multiple initialization segments
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Media
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: rawoul+webkit at gmail.com

A recent GStreamer change (https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4535) triggers issues when dealing with multiple initialization segments on the same track. With this change AppendPipeline will trigger a ParsingFailed error. Here's an extract of the logs to illustrate the problem:

> basesink gstbasesink.c:3657:gst_base_sink_event:<appsink2> received event 0x7f080056c0 stream-start event: 0x7f080056c0, time 99:99:99.999999999, seq-num 3723, GstEventStreamStart, stream-id=(string)1e0cd2c71ed662e1e145048bfaef7523/001, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)2;
> basesink gstbasesink.c:3701:gst_base_sink_event:<appsink2> Event received after EOS, dropping
>webkitmse AppendPipeline.cpp:1016:appendPipelineAppsinkPadEventProbe: Handling event stream-start on append pipeline appsinkPad
> basesink gstbasesink.c:3657:gst_base_sink_event:<appsink2> received event 0x7f080056c0 stream-start event: 0x7f080056c0, time 99:99:99.999999999, seq-num 3723, GstEventStreamStart, stream-id=(string)1e0cd2c71ed662e1e145048bfaef7523/001, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)2;
> basesink gstbasesink.c:3701:gst_base_sink_event:<appsink2> Event received after EOS, dropping
>  basesrc gstbasesrc.c:3132:gst_base_src_loop:<appsrc0> error: Internal data stream error.
>  basesrc gstbasesrc.c:3132:gst_base_src_loop:<appsrc0> error: streaming stopped, reason error (-5)
>structure gststructure.c:2093:priv_gst_structure_append_to_gstring: No value transform to serialize field 'gerror' of type 'GError'
>webkitmse AppendPipeline.cpp:266:handleErrorSyncMessage:<append-pipeline-video-mp4-0> Demuxing error: error message: 0x7f0800fe00, time 99:99:99.999999999, seq-num 3742, element 'appsrc0', GstMessageError, gerror=(GError)NULL, debug=(string)"../gitsrc/subprojects/gstreamer/libs/gst/base/gstbasesrc.c\(3132\):\ gst_base_src_loop\ \(\):\ /GstPipeline:append-pipeline-video-mp4-0/GstAppSrc:appsrc0:\012streaming\ stopped\,\ reason\ error\ \(-5\)", details=(structure)"details\,\ flow-return\=\(int\)-5\;";
>[WPEWebKit:MediaSource:-] SourceBuffer::sourceBufferPrivateAppendComplete(6467E18DC2CA0001) ParsingFailed

With this change, EOS will be propagated downstream to the AppendPipeline appsink, and the next stream-start event that is generated when the new init segment comes in is dropped, resulting in an error. Before the gstreamer change, the eos was not propagated to the appsink so the problem did not happen. Reverting the change is sufficient to fix the issue.

I've tried the following patch in bug 254664 and it does not help, instead I get another error:

>webkitmse AppendPipeline.cpp:1015:appendPipelineAppsinkPadEventProbe: Handling event eos on append pipeline appsinkPad
>webkitmse AppendPipeline.cpp:172:operator():<append-pipeline-video-mp4-0> Posting no-more-pads task to main thread
>webkitmse AppendPipeline.cpp:492:didReceiveInitializationSegment:<append-pipeline-video-mp4-0> New demuxed stream topology doesn't match the existing tracks topology

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230518/9094b412/attachment.htm>


More information about the webkit-unassigned mailing list