From a6e38d90df9ef9d5e46730e58a2973d4bdd1eea4 Mon Sep 17 00:00:00 2001 From: Rodeo Date: Sat, 27 Apr 2013 02:33:47 +0000 Subject: [PATCH] muxmp4: update MP4AddAudioTrack usage as per mp4v2 documentation. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5414 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/muxmp4.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c index b7bde7975..66f02d5c7 100644 --- a/libhb/muxmp4.c +++ b/libhb/muxmp4.c @@ -431,7 +431,9 @@ static int MP4Init( hb_mux_object_t * m ) } mux_data->track = MP4AddAudioTrack(m->file, mux_data->sample_rate, - mux_data->samples_per_frame, + // fixed frame duration, if applicable + mux_data->samples_per_frame > 0 ? + mux_data->samples_per_frame : MP4_INVALID_DURATION, audio_type); /* Tune track chunk duration */ @@ -1037,7 +1039,7 @@ static int MP4Mux( hb_mux_object_t * m, hb_mux_data_t * mux_data, else { /* Audio */ - if (mux_data->samples_per_frame) + if (mux_data->samples_per_frame > 0) // frame size is fixed and known duration = MP4_INVALID_DURATION; else -- 2.40.0