[vlc-commits] Revert "Revert "Correctly detect alac in mp4	properties""
    Jean-Baptiste Kempf 
    git at videolan.org
       
    Wed Apr  3 20:45:08 CEST 2013
    
    
  
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Apr  3 20:43:33 2013 +0200| [24a2b220c96fb6c42ba490d47e161a79618d7667] | committer: Jean-Baptiste Kempf
Revert "Revert "Correctly detect alac in mp4 properties""
This reverts commit 6265048ae8665189ea88262cd3aedd2d03abce35.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=24a2b220c96fb6c42ba490d47e161a79618d7667
---
 modules/demux/mp4/mp4.c |    5 +++++
 1 file changed, 5 insertions(+)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 945964a..236f053 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -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' ):
    
    
More information about the vlc-commits
mailing list