avidemux: only check video compression for video streams

Or else we might deref a stream with a NULL strf.vids and segfault
This commit is contained in:
Wim Taymans 2013-09-04 15:25:39 +02:00
parent a965185dee
commit 6f0e8a8b87

View file

@ -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 {