[0.11] gst-plugins-bad: mpegtsdemux: do not emit no-more-pads

Wim Taymans wtay at kemper.freedesktop.org
Fri Feb 10 07:47:21 PST 2012


Module: gst-plugins-bad
Branch: 0.11
Commit: 2eef9828d6735572e5f1bfd0409108e40963696c
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=2eef9828d6735572e5f1bfd0409108e40963696c

Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date:   Fri Feb  3 11:08:48 2012 +0000

mpegtsdemux: do not emit no-more-pads

Doing so may fix some things, but breaks others (new streams being
added in the future).

https://bugzilla.gnome.org/show_bug.cgi?id=665814

---

 gst/mpegdemux/gstmpegtsdemux.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c
index a7c3a17..012c1cc 100644
--- a/gst/mpegdemux/gstmpegtsdemux.c
+++ b/gst/mpegdemux/gstmpegtsdemux.c
@@ -399,6 +399,14 @@ gst_mpegts_demux_reset (GstMpegTSDemux * demux)
   demux->last_buf_ts = GST_CLOCK_TIME_NONE;
 }
 
+static void
+gst_mpegts_demux_no_more_pads (GstElement * demux)
+{
+  /* We should really call no-more-pads here, but we don't as
+     this would preclude addition of more pads if/when new streams
+     are added. */
+}
+
 #if 0
 static void
 gst_mpegts_demux_remove_pads (GstMpegTSDemux * demux)
@@ -1086,7 +1094,7 @@ gst_mpegts_demux_sync_streams (GstMpegTSDemux * demux, GstClockTime time)
          any pad that might be waiting for data */
       if (!stream->pad && demux->pending_pads > 0) {
         demux->pending_pads = 0;
-        gst_element_no_more_pads (GST_ELEMENT (demux));
+        gst_mpegts_demux_no_more_pads (GST_ELEMENT (demux));
       }
 
       if (stream->pad) {
@@ -1332,7 +1340,7 @@ gst_mpegts_demux_data_cb (GstPESFilter * filter, gboolean first,
          If not, we'll add pads as we get data for them, and will end up
          hitting decodebin2's overrun threshold (if using decodebin2) */
       GST_DEBUG_OBJECT (demux, "All pads added, we can signal no-more-pads");
-      gst_element_no_more_pads (GST_ELEMENT (demux));
+      gst_mpegts_demux_no_more_pads (GST_ELEMENT (demux));
     } else {
       GST_DEBUG_OBJECT (demux,
           "All pads could not be added, we will not signal no-more-pads");
@@ -1387,7 +1395,7 @@ gst_mpegts_demux_data_cb (GstPESFilter * filter, gboolean first,
         "Adding pad due to received data, decreasing pending pads to %d",
         demux->pending_pads);
     if (demux->pending_pads == 0)
-      gst_element_no_more_pads (GST_ELEMENT (demux));
+      gst_mpegts_demux_no_more_pads (GST_ELEMENT (demux));
 
     stream->discont = TRUE;
 
@@ -1741,7 +1749,7 @@ gst_mpegts_stream_parse_pmt (GstMpegTSStream * stream,
   GST_DEBUG_OBJECT (demux, "Done parsing PMT, pending pads now %d",
       demux->pending_pads);
   if (demux->pending_pads == 0)
-    gst_element_no_more_pads (GST_ELEMENT (demux));
+    gst_mpegts_demux_no_more_pads (GST_ELEMENT (demux));
 
   return TRUE;
 



More information about the gstreamer-commits mailing list