[FFmpeg-devel] [PATCH] lavf/avi: pull stream durations from index, when available
Rodger Combs
rodger.combs at gmail.com
Tue Jan 12 01:41:39 CET 2016
This fixes files that have an incorrect nb_frames but a valid index
---
libavformat/avidec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 3859810..0b14860 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -1602,6 +1602,7 @@ static int avi_read_idx1(AVFormatContext *s, int size)
ast->cum_len += get_duration(ast, len);
last_pos = pos;
anykey |= flags&AVIIF_INDEX;
+ st->duration = ast->cum_len;
}
if (!anykey) {
for (index = 0; index < s->nb_streams; index++) {
--
2.6.4
More information about the ffmpeg-devel
mailing list