From 376aaa828dca89eaaa4a7daf3d979055e5af943d Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 22 Apr 2024 16:05:29 +0200 Subject: [PATCH] decodebin3: Remove custom stream-start field if present This field is added by urisourcebin so that we can avoid double-parsing. It's no longer needed after. Part-of: --- subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c index 51f0434dd1..9ab1fa9fc0 100644 --- a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c +++ b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c @@ -1404,6 +1404,14 @@ sink_event_function (GstPad * sinkpad, GstDecodebin3 * dbin, GstEvent * event) input->input_is_parsed = s && gst_structure_has_field (s, "urisourcebin-parsed-data"); + if (input->input_is_parsed) { + /* We remove the custom field from stream-start so as not to pollute + * downstream */ + event = gst_event_make_writable (event); + s = gst_event_get_structure (event); + gst_structure_remove_field ((GstStructure *) s, + "urisourcebin-parsed-data"); + } /* Make sure group ids will be recalculated */ input->group_id = GST_GROUP_ID_INVALID;