diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-29 15:05:35 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-29 15:07:33 +0400 |
commit | a72df4dadc0dd4347e5cd0dc0674f59f16e89c95 (patch) | |
tree | e7ff33ffebb43d59d317031123f1b4b5d6313d16 /libavformat/movenc.c | |
parent | bc59d39b824900bafb53bf174314a59c2491f2e3 (diff) | |
parent | cf6977712c9e5abe6dc55289f6322ccbf10321a9 (diff) |
Merge commit 'cf6977712c9e5abe6dc55289f6322ccbf10321a9'
* commit 'cf6977712c9e5abe6dc55289f6322ccbf10321a9':
movenc: write avg_frame_rate as the framerate, not the codec timebase
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 25c462d9c9..7991ada384 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -551,7 +551,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); |