tsdemux: Don't queue data for streams that don't have a pad
authorEdward Hervey <edward@collabora.com>
Fri, 18 May 2012 08:15:15 +0000 (10:15 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 18 May 2012 09:11:37 +0000 (11:11 +0200)
This would result in an error further down, and it also avoids processing
for that data which we wouldn't be using anyway.

gst/mpegtsdemux/tsdemux.c

index b7cd0aa2870525da6dfaad5003dfbc25dd8649a2..037ce0495c93d0d0fc4c5fee563b63c36bc7a6f7 100644 (file)
@@ -1585,7 +1585,8 @@ gst_ts_demux_handle_packet (GstTSDemux * demux, TSDemuxStream * stream,
           GST_BUFFER_OFFSET (packet->buffer));
   }
 
-  if (packet->payload && (res == GST_FLOW_OK || res == GST_FLOW_NOT_LINKED)) {
+  if (packet->payload && (res == GST_FLOW_OK || res == GST_FLOW_NOT_LINKED)
+      && stream->pad) {
     gst_ts_demux_queue_data (demux, stream, packet);
     GST_DEBUG ("current_size:%d, expected_size:%d",
         stream->current_size, stream->expected_size);