]> git.sesse.net Git - vlc/blobdiff - modules/demux/mp4/mp4.c
Removes trailing spaces. Removes tabs.
[vlc] / modules / demux / mp4 / mp4.c
index a76652b763829b5a74808fd621481681ca46706f..db07c9787a7c3139a99bb8efe544e051bf176e91 100644 (file)
@@ -26,8 +26,6 @@
 
 #include <vlc/vlc.h>
 
-#include <stdio.h>
-#include <stdlib.h>                                      /* malloc(), free() */
 
 #include <vlc_demux.h>
 #include <vlc_playlist.h>
@@ -268,7 +266,7 @@ static int Open( vlc_object_t * p_this )
     demux_t  *p_demux = (demux_t *)p_this;
     demux_sys_t     *p_sys;
 
-    uint8_t         *p_peek;
+    const uint8_t   *p_peek;
 
     MP4_Box_t       *p_ftyp;
     MP4_Box_t       *p_rmra;
@@ -1477,6 +1475,17 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
             p_track->fmt.i_codec = VLC_FOURCC('Y','U','Y','2');
             break;
 
+        case VLC_FOURCC('i','n','2','4'):
+            /* in in24/in32 there's enda-atom to tell it's little-endian (if present) */
+            if( ( MP4_BoxGet( p_sample, "wave/enda" ) ) ||
+                ( MP4_BoxGet( p_sample, "enda" ) ) )
+            {
+                p_track->fmt.i_codec = VLC_FOURCC('4','2','n','i');
+            } else {
+                p_track->fmt.i_codec = p_sample->i_type;
+            }
+            break;
+
         default:
             p_track->fmt.i_codec = p_sample->i_type;
             break;
@@ -2208,7 +2217,7 @@ static int MP4_TrackSeek( demux_t *p_demux, mp4_track_t *p_track,
 
 /*
  * 3 types: for audio
- * 
+ *
  */
 #define QT_V0_MAX_SAMPLES 1024
 static int MP4_TrackSampleSize( mp4_track_t *p_track )