parsebin: Don't store bogus caps on GstStream
authorEdward Hervey <edward@centricular.com>
Wed, 23 Oct 2024 12:24:36 +0000 (14:24 +0200)
committerBackport Bot <gitlab-backport-bot@gstreamer-foundation.org>
Mon, 28 Oct 2024 13:15:40 +0000 (13:15 +0000)
If we can't get the current caps when receiving a stream-start, that's fine,
they can/will be provided by other means at a later time.

What we definitely should not do is provide the starting caps of the chain,
which are potentially completely different from the end ones (like for example
`application/x-rtp`)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7764>

subprojects/gst-plugins-base/gst/playback/gstparsebin.c

index 57a13334816c2a8d1f329d7daebb0d1a3c009656..5097cac47863b847fba293bc64f60631cb40fe06 100644 (file)
@@ -4129,10 +4129,6 @@ gst_parse_pad_stream_start_event (GstParsePad * parsepad, GstEvent * event)
       caps = gst_pad_get_current_caps (peer);
       gst_object_unref (peer);
     }
-    if (caps == NULL && parsepad->chain && parsepad->chain->start_caps) {
-      /* Still no caps, use the chain start caps */
-      caps = gst_caps_ref (parsepad->chain->start_caps);
-    }
 
     GST_DEBUG_OBJECT (parsepad,
         "Saw stream_start with no GstStream. Adding one. Caps %"