[vlc-devel] [PATCH 9/9] demux: mp4: trigger the packetizer for some AC3 tracks
Thomas Guillem
thomas at gllm.fr
Thu Oct 3 16:33:59 CEST 2019
---
modules/demux/mp4/essetup.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/modules/demux/mp4/essetup.c b/modules/demux/mp4/essetup.c
index 54ba3ff86b..d80afa6008 100644
--- a/modules/demux/mp4/essetup.c
+++ b/modules/demux/mp4/essetup.c
@@ -1007,7 +1007,23 @@ int SetupAudioES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
};
p_track->fmt.i_bitrate = 0;
if( BOXDATA(p_dac3)->i_bitrate_code < sizeof(pi_bitrate)/sizeof(*pi_bitrate) )
+ {
p_track->fmt.i_bitrate = pi_bitrate[BOXDATA(p_dac3)->i_bitrate_code] * 1000;
+
+ if (pi_bitrate[BOXDATA(p_dac3)->i_bitrate_code] == 640
+ && BOXDATA(p_dac3)->i_acmod == 7
+ && BOXDATA(p_dac3)->i_lfeon == 1)
+ {
+ /* DD+ can be an optional codec, and is deployed as an
+ * extension to a "core" AC-3 5.1 640kbit/s audiotrack.
+ * In that case, the AC-3 track might have an EAC3
+ * extension, therefore trigger the A52 packetizer to
+ * detect it (this needed for aout passhthrough
+ * configuration). */
+
+ p_track->fmt.b_packetized = false;
+ }
+ }
}
break;
}
--
2.20.1
More information about the vlc-devel
mailing list