]> git.sesse.net Git - vlc/commitdiff
Revert "Revert "Correctly detect alac in mp4 properties""
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 3 Apr 2013 18:43:33 +0000 (20:43 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 3 Apr 2013 18:45:03 +0000 (20:45 +0200)
This reverts commit 6265048ae8665189ea88262cd3aedd2d03abce35.

modules/demux/mp4/mp4.c

index 945964adeb0be0c09a017a0cb2d16c5c60649ce8..236f053fa176cd852e7358763b61c99b098abf6a 100644 (file)
@@ -2166,6 +2166,11 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
                             p_sample->data.p_sample_soun->p_qt_description,
                             p_track->fmt.i_extra);
                 }
+                if( p_track->fmt.i_extra >= 56 && p_sample->i_type == VLC_CODEC_ALAC )
+                {
+                    p_track->fmt.audio.i_channels = *((uint8_t*)p_track->fmt.p_extra + 41);
+                    p_track->fmt.audio.i_rate = GetDWBE((uint8_t*)p_track->fmt.p_extra + 52);
+                }
                 break;
 
             case VLC_FOURCC( 'v', 'c', '-', '1' ):