From 1297b556c723f1a3ea92aba22eccd27b02c6c25c Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 15 Oct 2008 15:42:29 +0000 Subject: gst/avi/gstavidemux.c: Skip entries for streams that don't have a output pad yet, thereby avoiding calling pad functi... 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 | 7 +++++++ gst/avi/gstavidemux.c | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index bb020d1f..58410d52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-10-15 Edward Hervey + + * 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 * gst/qtdemux/qtdemux.c: Remove previous wrong commit diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c index 255f5353..62313e5a 100644 --- a/gst/avi/gstavidemux.c +++ b/gst/avi/gstavidemux.c @@ -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) { -- cgit