]> git.sesse.net Git - vlc/blobdiff - modules/demux/mp4/libmp4.c
dbus: UpdateCaps is now always called with the playlist unlocked.
[vlc] / modules / demux / mp4 / libmp4.c
index 7e9a538b2652ecb1b9fee382936976c38463fb43..6902eb6c7d4598032acb6f98ab1071dd21857b6d 100644 (file)
@@ -1111,6 +1111,31 @@ error:
     MP4_READBOX_EXIT( 0 );
 }
 
+static int MP4_ReadBox_dac3( stream_t *p_stream, MP4_Box_t *p_box )
+{
+    MP4_Box_data_dac3_t *p_dac3;
+    MP4_READBOX_ENTER( MP4_Box_data_dac3_t );
+
+    p_dac3 = p_box->data.p_dac3;
+
+    unsigned i_header;
+    MP4_GET3BYTES( i_header );
+
+    p_dac3->i_fscod = ( i_header >> 22 ) & 0x03;
+    p_dac3->i_bsid  = ( i_header >> 17 ) & 0x01f;
+    p_dac3->i_bsmod = ( i_header >> 14 ) & 0x07;
+    p_dac3->i_acmod = ( i_header >> 11 ) & 0x07;
+    p_dac3->i_lfeon = ( i_header >> 10 ) & 0x01;
+    p_dac3->i_bitrate_code = ( i_header >> 5) & 0x1f;
+
+#ifdef MP4_VERBOSE
+    msg_Dbg( p_stream,
+             "read box: \"dac3\" fscod=0x%x bsid=0x%x bsmod=0x%x acmod=0x%x lfeon=0x%x bitrate_code=0x%x",
+             p_dac3->i_fscod, p_dac3->i_bsid, p_dac3->i_bsmod, p_dac3->i_acmod, p_dac3->i_lfeon, p_dac3->i_bitrate_code );
+#endif
+    MP4_READBOX_EXIT( 1 );
+}
+
 static int MP4_ReadBox_sample_soun( stream_t *p_stream, MP4_Box_t *p_box )
 {
     unsigned int i;
@@ -2528,6 +2553,7 @@ static const struct
     { FOURCC_dcom,  MP4_ReadBox_dcom,       MP4_FreeBox_Common },
     { FOURCC_cmvd,  MP4_ReadBox_cmvd,       MP4_FreeBox_cmvd },
     { FOURCC_avcC,  MP4_ReadBox_avcC,       MP4_FreeBox_avcC },
+    { FOURCC_dac3,  MP4_ReadBox_dac3,       MP4_FreeBox_Common },
 
     /* Nothing to do with this box */
     { FOURCC_mdat,  MP4_ReadBoxSkip,        MP4_FreeBox_Common },