diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-08-22 18:14:15 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2019-08-28 16:27:58 +0200 |
commit | 428b4aacb1a91a267650de644519882a5f700388 (patch) | |
tree | bd84a5f223a61412d3fbf56e8a61a60f199ea34a /libavformat | |
parent | d063f13700aa86365589f49b697e8c42b9cae4ca (diff) | |
download | ffmpeg-streaming-428b4aacb1a91a267650de644519882a5f700388.zip ffmpeg-streaming-428b4aacb1a91a267650de644519882a5f700388.tar.gz |
avformat/mov: improve timecode calculation
Fixes timecode calculation for NTSC frame rates.
Fixes ticket #5978.
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mov.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 8a4cdc4..675b915 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2304,8 +2304,8 @@ static int mov_parse_stsd_data(MOVContext *c, AVIOContext *pb, int val; val = AV_RB32(st->codecpar->extradata + 4); tmcd_ctx->tmcd_flags = val; - st->avg_frame_rate.num = st->codecpar->extradata[16]; /* number of frame */ - st->avg_frame_rate.den = 1; + st->avg_frame_rate.num = AV_RB32(st->codecpar->extradata + 8); /* timescale */ + st->avg_frame_rate.den = AV_RB32(st->codecpar->extradata + 12); /* frameDuration */ #if FF_API_LAVF_AVCTX FF_DISABLE_DEPRECATION_WARNINGS st->codec->time_base = av_inv_q(st->avg_frame_rate); |