Commit f8cd370
[MSE][GStreamer] block data flow until source pad is exposed
https://bugs.webkit.org/show_bug.cgi?id=276251
Reviewed by Xabier Rodriguez-Calvar.
In WebKitMediaSrc, there could be a race between main thread (linking
typefind element, see gsturisourcebin.c:setup_typefind) and streaming
thread (pushing data). webKitMediaSrcLoop does wait for source pad to
linked. However, there is no guarantee that peer pad is already active
at that point. This may lead to data loss while peer the pad is being
activated.
This change blocks downstream flow during pad addition, allowing
urisourcebin to link/activate typefind sink pad.
See: #1355
Original patch by Eugene Mutavchi <Ievgen_Mutavchi@comcast.com>.
* Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
(webKitMediaSrcEmitStreams): Add blocking probes to the Streams Pads, which will be removed after the pad has been added to the element.
Canonical link: https://commits.webkit.org/280813@main1 parent 34eb5f8 commit f8cd370
1 file changed
Lines changed: 9 additions & 0 deletions
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
327 | 328 | | |
328 | 329 | | |
329 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
330 | 338 | | |
331 | 339 | | |
332 | 340 | | |
| |||
340 | 348 | | |
341 | 349 | | |
342 | 350 | | |
| 351 | + | |
343 | 352 | | |
344 | 353 | | |
345 | 354 | | |
| |||
0 commit comments