Skip to content

Commit 31bd8a2

Browse files
eocanhaDivya-563
authored andcommitted
Migration to GStreamer 1.18.6: gst-plugins-base: gsturisourcebin: Don't try to plug a typefinder on dynamic sources.
1 parent 7d2e019 commit 31bd8a2

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
From 1961939a71e0da07072830aebf871341a3d745e9 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <[email protected]>
3+
Date: Fri, 24 Feb 2023 14:56:37 +0100
4+
Subject: [PATCH] gsturisourcebin: Don't try to plug a typefinder on dynamic
5+
sources.
6+
7+
setup_source() tries to plug a typefind element unconditionally to the
8+
source element on non-live streams, no matter if the element is dynamic
9+
or not. In the former case, the element might not have any src pad
10+
created, so the plugging will fail, triggering an unrecoverable error.
11+
12+
This patch only tries the plugging when the element is not dynamic (no
13+
new-pad callback has been configured). In case the element is dynamic,
14+
the callback will take care of configuration when pads appear in the
15+
future.
16+
17+
This solves many regressions on the YouTube MSE Conformance Tests[1] at
18+
least in downstream WPE 2.38[2] after migrating from GStreamer 1.16 to
19+
1.18, a change that introduces Playbin 3.
20+
21+
[1] https://ytlr-cert.appspot.com/latest/main.html
22+
[2] https://github.com/WebPlatformForEmbedded/WPEWebKit/tree/wpe-2.38
23+
---
24+
gst/playback/gsturisourcebin.c | 13 +++++++++----
25+
1 file changed, 9 insertions(+), 4 deletions(-)
26+
27+
diff --git a/gst/playback/gsturisourcebin.c b/gst/playback/gsturisourcebin.c
28+
index 9f637fb01..24f2b04b6 100644
29+
--- a/gst/playback/gsturisourcebin.c
30+
+++ b/gst/playback/gsturisourcebin.c
31+
@@ -2282,10 +2282,15 @@ setup_source (GstURISourceBin * urisrc)
32+
33+
return TRUE;
34+
} else if (urisrc->is_stream) {
35+
- GST_DEBUG_OBJECT (urisrc, "Setting up streaming");
36+
- /* do the stream things here */
37+
- if (!setup_typefind (urisrc, NULL))
38+
- goto streaming_failed;
39+
+ if (!urisrc->src_np_sig_id) {
40+
+ GST_DEBUG_OBJECT (urisrc, "Setting up streaming");
41+
+ /* do the stream things here */
42+
+ if (!setup_typefind (urisrc, NULL))
43+
+ goto streaming_failed;
44+
+ } else {
45+
+ GST_DEBUG_OBJECT (urisrc, "Not setting up streaming yet, waiting for"
46+
+ " dynamic pads to appear");
47+
+ }
48+
} else {
49+
GstIterator *pads_iter;
50+
gboolean done = FALSE;
51+
--
52+
2.34.1
53+

0 commit comments

Comments
 (0)