[FFmpeg-cvslog] movenc: use the first cluster duration as the tfhd default duration

Justin Ruggles git at videolan.org
Tue Feb 28 03:53:25 CET 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Sun Feb 26 17:21:07 2012 -0500| [f3dab5fb6d6290721038dea2e5b1778abecd232d] | committer: Justin Ruggles

movenc: use the first cluster duration as the tfhd default duration

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f3dab5fb6d6290721038dea2e5b1778abecd232d
---

 libavformat/movenc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index e2781ac..a74dd2e 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2215,7 +2215,7 @@ static int mov_write_tfhd_tag(AVIOContext *pb, MOVTrack *track,
     if (flags & MOV_TFHD_BASE_DATA_OFFSET)
         avio_wb64(pb, moof_offset);
     if (flags & MOV_TFHD_DEFAULT_DURATION) {
-        track->default_duration = track->audio_vbr ? track->enc->frame_size : 1;
+        track->default_duration = get_cluster_duration(track, 0);
         avio_wb32(pb, track->default_duration);
     }
     if (flags & MOV_TFHD_DEFAULT_SIZE) {



More information about the ffmpeg-cvslog mailing list