tsdemux: Push GST_EVENT_STREAM_COLLECTION
authorEdward Hervey <edward@centricular.com>
Wed, 2 Nov 2022 13:45:51 +0000 (14:45 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 16 Nov 2022 14:01:46 +0000 (14:01 +0000)
Demuxers that are not streams-aware will have that handled by parsebin. This
created a difference in results downstream between streams-aware and
non-streams-aware demuxers

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

subprojects/gst-plugins-bad/gst/mpegtsdemux/tsdemux.c

index 6408c9beccedb40f612de6337bf9415e6cde2a58..dc59a40c0691e2da987ea179c24a5dc1ebf6c489 100644 (file)
@@ -2231,6 +2231,9 @@ gst_ts_demux_update_program (MpegTSBase * base, MpegTSBaseProgram * program)
         gst_pad_push_event (stream->pad, gst_event_new_gap (0, 0));
       }
     }
+    if (stream->pad)
+      gst_pad_push_event (stream->pad,
+          gst_event_new_stream_collection (program->collection));
   }
 }
 
@@ -2317,6 +2320,9 @@ gst_ts_demux_program_started (MpegTSBase * base, MpegTSBaseProgram * program)
         GST_DEBUG_OBJECT (stream->pad, "sparse stream, pushing GAP event");
         gst_pad_push_event (stream->pad, gst_event_new_gap (0, 0));
       }
+      if (stream->pad)
+        gst_pad_push_event (stream->pad,
+            gst_event_new_stream_collection (program->collection));
     }
 
     gst_element_no_more_pads ((GstElement *) demux);