mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-04-01 22:49:21 +00:00
movenc: use the first cluster duration as the tfhd default duration
This commit is contained in:
parent
681d17264f
commit
f3dab5fb6d
@ -2215,7 +2215,7 @@ static int mov_write_tfhd_tag(AVIOContext *pb, MOVTrack *track,
|
|||||||
if (flags & MOV_TFHD_BASE_DATA_OFFSET)
|
if (flags & MOV_TFHD_BASE_DATA_OFFSET)
|
||||||
avio_wb64(pb, moof_offset);
|
avio_wb64(pb, moof_offset);
|
||||||
if (flags & MOV_TFHD_DEFAULT_DURATION) {
|
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);
|
avio_wb32(pb, track->default_duration);
|
||||||
}
|
}
|
||||||
if (flags & MOV_TFHD_DEFAULT_SIZE) {
|
if (flags & MOV_TFHD_DEFAULT_SIZE) {
|
||||||
|
Loading…
Reference in New Issue
Block a user