[FFmpeg-cvslog] movenc: fix tmcd parameters
Michael Niedermayer
git at videolan.org
Mon Oct 15 15:10:18 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Oct 15 14:57:07 2012 +0200| [5c7a62aef59e4e7b92078a4c1f5f93ca5c8021ff] | committer: Michael Niedermayer
movenc: fix tmcd parameters
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5c7a62aef59e4e7b92078a4c1f5f93ca5c8021ff
---
libavformat/movenc.c | 2 +-
tests/ref/lavf/mov | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 8316c30..0b0bf83 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1146,7 +1146,7 @@ static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track)
static int mov_write_tmcd_tag(AVIOContext *pb, MOVTrack *track)
{
int64_t pos = avio_tell(pb);
- int frame_duration = track->enc->time_base.num;
+ int frame_duration = av_rescale(track->timescale, track->enc->time_base.num, track->enc->time_base.den);
int nb_frames = (track->timescale + frame_duration/2) / frame_duration;
avio_wb32(pb, 0); /* size */
diff --git a/tests/ref/lavf/mov b/tests/ref/lavf/mov
index d7cfbf8..4554ea6 100644
--- a/tests/ref/lavf/mov
+++ b/tests/ref/lavf/mov
@@ -1,7 +1,7 @@
fcbe7806047914d9751fd9053009df69 *./tests/data/lavf/lavf.mov
367365 ./tests/data/lavf/lavf.mov
./tests/data/lavf/lavf.mov CRC=0xb2f59ab4
-d023fdd2149f75ef231180b6b0b0a988 *./tests/data/lavf/lavf.mov
+72eac0051107a16e41d5263dab640f26 *./tests/data/lavf/lavf.mov
358455 ./tests/data/lavf/lavf.mov
./tests/data/lavf/lavf.mov CRC=0xb2f59ab4
cbc587335946df1f08d838f48ef396f0 *./tests/data/lavf/lavf.mov
More information about the ffmpeg-cvslog
mailing list