[vlc-devel] [PATCH 2/9] aout: return a valid bitspersample for S/PDIF
Thomas Guillem
thomas at gllm.fr
Wed Oct 5 18:37:45 CEST 2016
---
include/vlc_aout.h | 9 ++++++---
src/audio_output/common.c | 4 ++++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/include/vlc_aout.h b/include/vlc_aout.h
index a4dc8fa..6f471f2 100644
--- a/include/vlc_aout.h
+++ b/include/vlc_aout.h
@@ -67,12 +67,15 @@
&& ((p_first)->i_physical_channels == (p_second)->i_physical_channels)\
&& ((p_first)->i_original_channels == (p_second)->i_original_channels) )
-#define AOUT_FMT_LINEAR( p_format ) \
- (aout_BitsPerSample((p_format)->i_format) != 0)
-
#define VLC_CODEC_SPDIFL VLC_FOURCC('s','p','d','i')
#define VLC_CODEC_SPDIFB VLC_FOURCC('s','p','d','b')
+#define AOUT_FMT_LINEAR( p_format ) \
+ (aout_BitsPerSample((p_format)->i_format) != 0 \
+ && (p_format)->i_format != VLC_CODEC_SPDIFL \
+ && (p_format)->i_format != VLC_CODEC_SPDIFB \
+ )
+
#define AOUT_FMT_SPDIF( p_format ) \
( ((p_format)->i_format == VLC_CODEC_SPDIFL) \
|| ((p_format)->i_format == VLC_CODEC_SPDIFB) \
diff --git a/src/audio_output/common.c b/src/audio_output/common.c
index 4914d53..83479fa 100644
--- a/src/audio_output/common.c
+++ b/src/audio_output/common.c
@@ -75,6 +75,10 @@ unsigned int aout_BitsPerSample( vlc_fourcc_t i_format )
case VLC_CODEC_F64B:
return 64;
+ case VLC_CODEC_SPDIFL:
+ case VLC_CODEC_SPDIFB:
+ return 16;
+
default:
/* For these formats the caller has to indicate the parameters
* by hand. */
--
2.9.3
More information about the vlc-devel
mailing list