]> git.sesse.net Git - vlc/commitdiff
Parsed enda atom in mp4 demuxer.
authorLaurent Aimar <fenrir@videolan.org>
Sat, 6 Feb 2010 12:52:13 +0000 (13:52 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 6 Feb 2010 13:40:45 +0000 (14:40 +0100)
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.h

index f8869a558d49eb6105cacf279a10a786f271b00e..4bbdce98e110b259c47359c47b1fbf9b7c143306 100644 (file)
@@ -1136,6 +1136,22 @@ static int MP4_ReadBox_dac3( stream_t *p_stream, MP4_Box_t *p_box )
     MP4_READBOX_EXIT( 1 );
 }
 
+static int MP4_ReadBox_enda( stream_t *p_stream, MP4_Box_t *p_box )
+{
+    MP4_Box_data_enda_t *p_enda;
+    MP4_READBOX_ENTER( MP4_Box_data_enda_t );
+
+    p_enda = p_box->data.p_enda;
+
+    MP4_GET2BYTES( p_enda->i_little_endian );
+
+#ifdef MP4_VERBOSE
+    msg_Dbg( p_stream,
+             "read box: \"enda\" little_endian=%d", p_enda->i_little_endian );
+#endif
+    MP4_READBOX_EXIT( 1 );
+}
+
 static int MP4_ReadBox_sample_soun( stream_t *p_stream, MP4_Box_t *p_box )
 {
     unsigned int i;
@@ -2554,6 +2570,7 @@ static const struct
     { FOURCC_cmvd,  MP4_ReadBox_cmvd,       MP4_FreeBox_cmvd },
     { FOURCC_avcC,  MP4_ReadBox_avcC,       MP4_FreeBox_avcC },
     { FOURCC_dac3,  MP4_ReadBox_dac3,       MP4_FreeBox_Common },
+    { FOURCC_enda,  MP4_ReadBox_enda,       MP4_FreeBox_Common },
 
     /* Nothing to do with this box */
     { FOURCC_mdat,  MP4_ReadBoxSkip,        MP4_FreeBox_Common },
index a4e786d4477c41181182b3ded605f43e2fad5aca..5216c1c76c816f17666a78c0bf99c30503d1a8b9 100644 (file)
 #define FOURCC_alac VLC_FOURCC( 'a', 'l', 'a', 'c' )
 #define FOURCC_dac3 VLC_FOURCC( 'd', 'a', 'c', '3' )
 #define FOURCC_dec3 VLC_FOURCC( 'd', 'e', 'c', '3' )
+#define FOURCC_enda VLC_FOURCC( 'e', 'n', 'd', 'a' )
 
 #define FOURCC_zlib VLC_FOURCC( 'z', 'l', 'i', 'b' )
 #define FOURCC_SVQ1 VLC_FOURCC( 'S', 'V', 'Q', '1' )
@@ -872,6 +873,12 @@ typedef struct
 
 } MP4_Box_data_dac3_t;
 
+typedef struct
+{
+    uint16_t i_little_endian;
+
+} MP4_Box_data_enda_t;
+
 /*
 typedef struct MP4_Box_data__s
 {
@@ -906,6 +913,7 @@ typedef union MP4_Box_data_s
         MP4_Box_data_esds_t *p_esds;
         MP4_Box_data_avcC_t *p_avcC;
         MP4_Box_data_dac3_t *p_dac3;
+        MP4_Box_data_enda_t *p_enda;
 
     MP4_Box_data_stsz_t *p_stsz;
     MP4_Box_data_stz2_t *p_stz2;