[Webkit-unassigned] [Bug 185242] [MSE][GStreamer] Delete properly the stream from the WebKitMediaSource
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri May 4 02:25:07 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=185242
--- Comment #5 from Enrique OcaƱa <eocanha at igalia.com> ---
Comment on attachment 339498
--> https://bugs.webkit.org/attachment.cgi?id=339498
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=339498&action=review
> Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:543
> + source->priv->numberOfAudioStreams--;
These changes in numberOf{Audio,Video,Text}Streams must be protected by GST_OBJECT_{LOCK,UNLOCK}(webKitMediaSrc) (webKitMediaSrc is "source" in webKitMediaSrcFreeStream()). See PlaybackPipeline::attachTrack() and ::reattachTrack().
In order to avoid taking both the webKitMediaSrc and stream locks at the same time, split the code in two pieces, duplicating the "if (stream->type != WebCore::Invalid) {" block and its inner switch statement. The first "if" block would be protected by GST_OBJECT{LOCK,UNLOCK}(webKitMediaSrc) and would just change numberOf{Audio,Video,Text}Streams as quickly as possible. The second "if" block would be the original one, which locks on streamLock.
--
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/20180504/40e78ae8/attachment.html>
More information about the webkit-unassigned
mailing list