diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-10-09 03:42:57 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-10-10 01:58:16 +0300 |
commit | 21bffa93a6fc73e1f1859f8bc224409eaaf27658 (patch) | |
tree | 81b8ec417fb7bc97e56250ab36c2c131c8cf5e3a /libavformat | |
parent | 987690799dd86433bf98b897aaa4c8d93ade646d (diff) |
avformat/movenc: Switch mov_write_uuidprof_tag() to avg_frame_rate
Using the stream timebase simply overflows
Fix integer overflow in psp framerate computation
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/movenc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 8b4aa5fbe2..2c155eb8b6 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -4267,8 +4267,7 @@ static void mov_write_uuidprof_tag(AVIOContext *pb, AVFormatContext *s) AVCodecParameters *video_par = s->streams[0]->codecpar; AVCodecParameters *audio_par = s->streams[1]->codecpar; int audio_rate = audio_par->sample_rate; - // TODO: should be avg_frame_rate - int frame_rate = ((video_st->time_base.den) * (0x10000)) / (video_st->time_base.num); + int64_t frame_rate = (video_st->avg_frame_rate.num * 0x10000LL) / video_st->avg_frame_rate.den; int audio_kbitrate = audio_par->bit_rate / 1000; int video_kbitrate = FFMIN(video_par->bit_rate / 1000, 800 - audio_kbitrate); |