[FFmpeg-devel] [FFmpeg-cvslog] Always use av_set_pts_info to set the stream time base.
Ronald S. Bultje
rsbultje
Sun Feb 6 22:10:45 CET 2011
Hi,
On Sun, Feb 6, 2011 at 5:34 AM, Reimar D?ffinger
<Reimar.Doeffinger at gmx.de> wrote:
> 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.
You're right, queued locally to keep the two relatively in sync...
Ronald
More information about the ffmpeg-devel
mailing list