avidemux: correct duration for audio VBR buffers in pull mode

This commit is contained in:
Mark Nauwelaerts 2013-02-10 15:10:32 +01:00
parent f0645b79c5
commit bf81dce432

View file

@ -1370,9 +1370,13 @@ gst_avi_demux_get_buffer_info (GstAviDemux * avi, GstAviStream * stream,
if (timestamp)
*timestamp =
avi_stream_convert_frames_to_time_unchecked (stream, entry->total);
if (ts_end)
if (ts_end) {
gint size = 1;
if (G_LIKELY (entry_n + 1 < stream->idx_n))
size = stream->index[entry_n + 1].total - entry->total;
*ts_end = avi_stream_convert_frames_to_time_unchecked (stream,
entry->total + 1);
entry->total + size);
}
} else {
if (timestamp)
*timestamp =