[vlc-commits] commit: Fixed some mp4/mov with ac3 audio tracks. (Laurent Aimar )

git at videolan.org git at videolan.org
Sun Apr 11 23:29:10 CEST 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Apr 11 23:26:22 2010 +0200| [b0b8cd625143ff58a60cd83b2fff23d75a02a70a] | committer: Laurent Aimar 

Fixed some mp4/mov with ac3 audio tracks.

It closes #3515.

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

 modules/demux/mp4/mp4.c |   25 ++++++++++++++++++++++---
 1 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 923e89a..22a708e 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -1540,6 +1540,28 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
             p_soun->i_qt_version = 0;
         }
     }
+    else if( p_track->fmt.i_cat == AUDIO_ES && p_sample->data.p_sample_soun->i_qt_version == 1 )
+    {
+        MP4_Box_data_sample_soun_t *p_soun = p_sample->data.p_sample_soun;
+
+        switch( p_sample->i_type )
+        {
+            case( VLC_FOURCC( '.', 'm', 'p', '3' ) ):
+            case( VLC_FOURCC( 'm', 's', 0x00, 0x55 ) ):
+            {
+                if( p_track->i_sample_size > 1 )
+                    p_soun->i_qt_version = 0;
+                break;
+            }
+            case( VLC_FOURCC( 'a', 'c', '-', '3' ) ):
+            case( VLC_FOURCC( 'e', 'c', '-', '3' ) ):
+            case( VLC_FOURCC( 'm', 's', 0x20, 0x00 ) ):
+                p_soun->i_qt_version = 0;
+                break;
+            default:
+                break;
+        }
+    }
 
     /* */
     switch( p_track->fmt.i_cat )
@@ -1607,10 +1629,7 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
         case( VLC_FOURCC( '.', 'm', 'p', '3' ) ):
         case( VLC_FOURCC( 'm', 's', 0x00, 0x55 ) ):
         {
-            MP4_Box_data_sample_soun_t *p_soun = p_sample->data.p_sample_soun;
             p_track->fmt.i_codec = VLC_FOURCC( 'm', 'p', 'g', 'a' );
-            if( p_track->i_sample_size > 1 )
-                p_soun->i_qt_version = 0;
             break;
         }
         case( VLC_FOURCC( 'a', 'c', '-', '3' ) ):



More information about the vlc-commits mailing list