[FFmpeg-devel] [FFmpeg-cvslog] Always use av_set_pts_info to set the stream time base.

Reimar Döffinger Reimar.Doeffinger
Sun Feb 6 11:34:25 CET 2011


On Sat, Feb 05, 2011 at 08:05:24PM -0500, Ronald S. Bultje wrote:
> Hi,
> 
> On Sat, Feb 5, 2011 at 4:08 AM, Reimar D?ffinger <git at videolan.org> wrote:
> > diff --git a/libavformat/oggparseskeleton.c b/libavformat/oggparseskeleton.c
> > index ad0dded..f0e17f9 100644
> > --- a/libavformat/oggparseskeleton.c
> > +++ b/libavformat/oggparseskeleton.c
> > @@ -60,8 +60,9 @@ static int skeleton_header(AVFormatContext *s, int idx)
> > ? ? ? ? start_den = AV_RL64(buf+20);
> >
> > ? ? ? ? if (start_den) {
> > - ? ? ? ? ? ?av_reduce(&start_time, &st->time_base.den, start_num, start_den, INT_MAX);
> > - ? ? ? ? ? ?st->time_base.num = 1;
> > + ? ? ? ? ? ?int64_t base_den;
> > + ? ? ? ? ? ?av_reduce(&start_time, &base_den, start_num, start_den, INT_MAX);
> > + ? ? ? ? ? ?av_set_pts_info(st, 64, 1, base_den);
> > ? ? ? ? ? ? os->lastpts =
> > ? ? ? ? ? ? st->start_time = start_time;
> > ? ? ? ? }
> 
> Does av_set_pts_info() already call av_reduce()?

gcd(1, ...) = 1 so the av_reduce in av_set_pts_info will be a NOP
and not serve the purpose.



More information about the ffmpeg-devel mailing list