Re: [FFmpeg-devel] [PATCH] lavf/avi: pull stream durations from index, when available

2016-01-12 Thread Michael Niedermayer
On Mon, Jan 11, 2016 at 06:41:39PM -0600, Rodger Combs wrote:
> This fixes files that have an incorrect nb_frames but a valid index
> ---
>  libavformat/avidec.c | 1 +
>  1 file changed, 1 insertion(+)

can you share such a file ?

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] lavf/avi: pull stream durations from index, when available

2016-01-11 Thread Rodger Combs
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

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel