From 6f0e8a8b87c7ab9318d7ab5c90863d4290d8133f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 4 Sep 2013 15:25:39 +0200 Subject: [PATCH] avidemux: only check video compression for video streams Or else we might deref a stream with a NULL strf.vids and segfault --- gst/avi/gstavidemux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c index d4aa1d6f32..79f1c23bed 100644 --- a/gst/avi/gstavidemux.c +++ b/gst/avi/gstavidemux.c @@ -2716,7 +2716,8 @@ gst_avi_demux_parse_index (GstAviDemux * avi, GstBuffer * buf) if (stream->strh->type == GST_RIFF_FCC_auds) { /* all audio frames are keyframes */ ENTRY_SET_KEYFRAME (&entry); - } else if (stream->strf.vids->compression == GST_RIFF_DXSB) { + } else if (stream->strh->type == GST_RIFF_FCC_vids && + stream->strf.vids->compression == GST_RIFF_DXSB) { /* all xsub frames are keyframes */ ENTRY_SET_KEYFRAME (&entry); } else {