]> granicus.if.org Git - handbrake/commitdiff
muxmp4: update MP4AddAudioTrack usage as per mp4v2 documentation.
authorRodeo <tdskywalker@gmail.com>
Sat, 27 Apr 2013 02:33:47 +0000 (02:33 +0000)
committerRodeo <tdskywalker@gmail.com>
Sat, 27 Apr 2013 02:33:47 +0000 (02:33 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5414 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/muxmp4.c

index b7bde7975c3c0e5c1fa8a5f6999e4f44e6d16bbb..66f02d5c736828bb5ff74556fbe78befd6611725 100644 (file)
@@ -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