gst/avi/gstavidemux.c: Skip entries for streams that don't have a output pad yet...
authorEdward Hervey <bilboed@bilboed.com>
Wed, 15 Oct 2008 15:42:29 +0000 (15:42 +0000)
committerEdward Hervey <bilboed@bilboed.com>
Wed, 15 Oct 2008 15:42:29 +0000 (15:42 +0000)
Original commit message from CVS:
* gst/avi/gstavidemux.c: (gst_avi_demux_stream_scan):
Skip entries for streams that don't have a output pad yet, thereby
avoiding calling pad functions with a NULL pad.
Fixes #556424

ChangeLog
gst/avi/gstavidemux.c

index bb020d1..58410d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2008-10-15  Edward Hervey  <edward.hervey@collabora.co.uk>
 
+       * gst/avi/gstavidemux.c: (gst_avi_demux_stream_scan):
+       Skip entries for streams that don't have a output pad yet, thereby
+       avoiding calling pad functions with a NULL pad.
+       Fixes #556424
+
+2008-10-15  Edward Hervey  <edward.hervey@collabora.co.uk>
+
        * gst/qtdemux/qtdemux.c: Remove previous wrong commit
        * tests/check/elements/icydemux.c: (icydemux_found_pad):
        Remove problematic and useless refcount check.
index 255f535..62313e5 100644 (file)
@@ -2330,6 +2330,12 @@ gst_avi_demux_stream_scan (GstAviDemux * avi,
     }
 
     stream = &avi->stream[stream_nr];
+    if (stream->pad == NULL) {
+      GST_WARNING_OBJECT (avi,
+          "Stream %d does not have an output pad, can't create new index",
+          stream_nr);
+      goto next;
+    }
 
     /* pre-allocate */
     if (index_size % 1024 == 0) {