avidemux: improve audio vbr detection

Subsequent entry time calculations use blockalign value to determine
number of frames per chunk, and blockalign == 1 is then most unlikely to result
in reasonable values (which also aligns with "spec").
This commit is contained in:
Mark Nauwelaerts 2010-06-16 15:40:34 +02:00
parent 6a9c70486f
commit a69e419c8e

View file

@ -1988,11 +1988,12 @@ gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf)
GST_DEBUG_OBJECT (element, "marking video as VBR, res %d", res);
break;
case GST_RIFF_FCC_auds:
stream->is_vbr = (stream->strh->samplesize == 0)
&& stream->strh->scale > 1;
res =
gst_riff_parse_strf_auds (element, sub, &stream->strf.auds,
&stream->extradata);
stream->is_vbr = (stream->strh->samplesize == 0)
&& stream->strh->scale > 1
&& stream->strf.auds->blockalign != 1;
sub = NULL;
GST_DEBUG_OBJECT (element, "marking audio as VBR:%d, res %d",
stream->is_vbr, res);