[vlc-commits] vlc_aout: add AOUT_FMT_HDMI

Thomas Guillem git at videolan.org
Wed Sep 14 15:32:03 CEST 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Sep 13 14:13:22 2016 +0200| [47c74c4e989102536777fc3c3afba87783434abb] | committer: Thomas Guillem

vlc_aout: add AOUT_FMT_HDMI

And remove EAC3 from AOUT_FMT_SPDIF.
We don't want to implement new codecs like EAC3 on old audio output. These
old audio output will continue to use the AOUT_FMT_SPDIF define.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=47c74c4e989102536777fc3c3afba87783434abb
---

 include/vlc_aout.h     | 6 +++++-
 src/audio_output/dec.c | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/include/vlc_aout.h b/include/vlc_aout.h
index ecc2475..125918e 100644
--- a/include/vlc_aout.h
+++ b/include/vlc_aout.h
@@ -77,9 +77,13 @@
     ( ((p_format)->i_format == VLC_CODEC_SPDIFL)       \
        || ((p_format)->i_format == VLC_CODEC_SPDIFB)   \
        || ((p_format)->i_format == VLC_CODEC_A52)      \
-       || ((p_format)->i_format == VLC_CODEC_EAC3)     \
        || ((p_format)->i_format == VLC_CODEC_DTS) )
 
+/* TODO: add VLC_CODEC_MLP, VLC_CODEC_TRUEHD */
+#define AOUT_FMT_HDMI( p_format )                   \
+    ( (p_format)->i_format == VLC_CODEC_EAC3        \
+    )
+
 /* Values used for the audio-channels object variable */
 #define AOUT_VAR_CHAN_UNSET         0 /* must be zero */
 #define AOUT_VAR_CHAN_STEREO        1
diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index c1cc1db..1751e30 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -207,7 +207,7 @@ static void aout_DecSilence (audio_output_t *aout, mtime_t length, mtime_t pts)
     size_t frames = (fmt->i_rate * length) / CLOCK_FREQ;
     block_t *block;
 
-    if (AOUT_FMT_SPDIF(fmt))
+    if (AOUT_FMT_SPDIF(fmt) || AOUT_FMT_HDMI(fmt))
         block = block_Alloc (4 * frames);
     else
         block = block_Alloc (frames * fmt->i_bytes_per_frame);



More information about the vlc-commits mailing list