diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-02-26 17:21:07 -0500 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-02-27 04:33:37 -0500 |
commit | f3dab5fb6d6290721038dea2e5b1778abecd232d (patch) | |
tree | daa4e70b65ea98e17be18b61b4d5fcaf33300caa /libavformat/movenc.c | |
parent | 681d17264f8ae069d43d5fe5369b4b17e225ea9f (diff) | |
download | ffmpeg-f3dab5fb6d6290721038dea2e5b1778abecd232d.tar.gz |
movenc: use the first cluster duration as the tfhd default duration
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r-- | libavformat/movenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index e2781accbe..a74dd2e683 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) { |