[FFmpeg-devel] [PATCH] Revert "matroskadec: don't set codec timebase."
Dale Curtis
dalecurtis at chromium.org
Wed Apr 18 02:24:01 CEST 2012
On Tue, Apr 17, 2012 at 2:59 PM, Dale Curtis <dalecurtis at chromium.org>wrote:
> On Tue, Apr 17, 2012 at 1:52 AM, Michael Niedermayer <michaelni at gmx.at>wrote:
>>
>> > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
>> > index e922c6e..f9865d1 100644
>> > --- a/libavformat/matroskadec.c
>> > +++ b/libavformat/matroskadec.c
>> > @@ -1587,7 +1587,7 @@ static int matroska_read_header(AVFormatContext
>> *s)
>> > if (st->codec->codec_id != CODEC_ID_H264)
>> > st->need_parsing = AVSTREAM_PARSE_HEADERS;
>> > if (track->default_duration)
>> > - st->avg_frame_rate =
>> > av_d2q(1000000000.0/track->default_duration, INT_MAX);
>> > + st->r_frame_rate = st->avg_frame_rate =
>> > av_d2q(1000000000.0/track->default_duration, INT_MAX);
>> > } else if (track->type == MATROSKA_TRACK_TYPE_AUDIO) {
>>
>> thats not looking like git master but, yes thats approximately
>> the idea. the INT_MAX will probably need some adjustment though
>>
>>
> As far as I can tell the current calculations for r_frame_rate are limited
> by INT_MAX already. Are you thinking we should only set r_frame_rate =
> avg_frame_rate if avg_frame_rate is sane?
>
Luca landed a patch in libav which is in line with your suggestion and uses
av_reduce with a sane max. I'm assuming it'll be picked up in the next
merge, so we can drop this patch set / discussion. Thanks!
- dale
More information about the ffmpeg-devel
mailing list