diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-05-18 15:49:46 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-05-29 10:01:23 +0400 |
commit | cf6977712c9e5abe6dc55289f6322ccbf10321a9 (patch) | |
tree | 994c2f04afebeffc71e908473fe69cf6348f6e17 /libavformat/movenc.c | |
parent | 81eec081afea9fc017a175581ceea7c420a0dfc3 (diff) |
movenc: write avg_frame_rate as the framerate, not the codec timebase
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r-- | libavformat/movenc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index cf0158be52..dcd3294e01 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -483,7 +483,13 @@ static int mov_write_dvc1_structs(MOVTrack *track, uint8_t *buf) put_bits(&pbc, 1, !slices); /* no slice code */ put_bits(&pbc, 1, 0); /* no bframe */ put_bits(&pbc, 1, 0); /* reserved */ - put_bits32(&pbc, track->enc->time_base.den); /* framerate */ + + /* framerate */ + if (track->st->avg_frame_rate.num > 0 && track->st->avg_frame_rate.den > 0) + put_bits32(&pbc, track->st->avg_frame_rate.num / track->st->avg_frame_rate.den); + else + put_bits32(&pbc, 0xffffffff); + flush_put_bits(&pbc); av_free(unescaped); |