avidemux: ignore stream with invalid header time metadata

This commit is contained in:
Mark Nauwelaerts 2010-03-11 15:02:48 +01:00
parent 145b3a3079
commit c007d8535c

View file

@ -1992,6 +1992,14 @@ gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf)
sub = NULL;
GST_DEBUG_OBJECT (element, "marking audio as VBR:%d, res %d",
stream->is_vbr, res);
/* we need these or we have no way to come up with timestamps */
if ((stream->is_vbr && !stream->strf.auds->av_bps) ||
(!stream->is_vbr && (!stream->strh->scale ||
stream->strh->rate))) {
GST_WARNING_OBJECT (element,
"invalid audio header, ignoring stream");
goto fail;
}
break;
case GST_RIFF_FCC_iavs:
stream->is_vbr = TRUE;