[Ffmpeg-devel] Re: [PATCH] mov fps fix

Michael Niedermayer michaelni
Mon Jan 9 17:27:04 CET 2006


Hi

On Mon, Jan 09, 2006 at 03:56:44PM +0100, Baptiste COUDURIER wrote:
> Hi
> 
> Michael Niedermayer wrote:
> >> [...]
> >>Index: libavformat/mov.c
> >>===================================================================
> >>RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/mov.c,v
> >>retrieving revision 1.98
> >>diff -u -p -r1.98 mov.c
> >>--- libavformat/mov.c	30 Dec 2005 20:34:08 -0000	1.98
> >>+++ libavformat/mov.c	9 Jan 2006 14:03:11 -0000
> >>@@ -1448,6 +1448,10 @@ av_log(NULL, AV_LOG_DEBUG, "track[%i].st
> >>         total_sample_count+=sample_count;
> >>     }
> >> 
> >>+    if (entries > 0) {
> >>+        st->time_base.num = c->streams[c->fc->nb_streams - 1]->stts_data[0].duration;
> >>+        st->time_base.den = c->streams[c->fc->nb_streams - 1]->time_scale;
> >>+    }
> > 
> > 
> > rejected this is wrong for variable fps files
> > 
> > [...]
> > 
> 
> What about setting it if entries == 1 ?

1. you must also change/check dts&pts of the returned AVPackets
2. use av_set_pts_info()
3. use the greatest common divisor of all durations would be more general

[...]
-- 
Michael





More information about the ffmpeg-devel mailing list