[vlc-devel] [PATCH 2/8] ES: similar audio format have the same channel_type
Adrien Maglo
magsoft at videolan.org
Fri Feb 24 16:14:56 CET 2017
---
include/vlc_aout.h | 1 +
src/misc/es_format.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/vlc_aout.h b/include/vlc_aout.h
index bbe7b4c..bc52f27 100644
--- a/include/vlc_aout.h
+++ b/include/vlc_aout.h
@@ -64,6 +64,7 @@
/* Check if i_rate == i_rate and i_channels == i_channels */
#define AOUT_FMTS_SIMILAR( p_first, p_second ) ( \
((p_first)->i_rate == (p_second)->i_rate) \
+ && ((p_first)->channel_type == (p_second)->channel_type) \
&& ((p_first)->i_physical_channels == (p_second)->i_physical_channels)\
&& ((p_first)->i_original_channels == (p_second)->i_original_channels) )
diff --git a/src/misc/es_format.c b/src/misc/es_format.c
index c2f320d..e8ada57 100644
--- a/src/misc/es_format.c
+++ b/src/misc/es_format.c
@@ -581,7 +581,8 @@ bool es_format_IsSimilar( const es_format_t *p_fmt1, const es_format_t *p_fmt2 )
if( a1.i_format && a2.i_format && a1.i_format != a2.i_format )
return false;
- if( a1.i_rate != a2.i_rate ||
+ if( a1.channel_type != a2.channel_type ||
+ a1.i_rate != a2.i_rate ||
a1.i_physical_channels != a2.i_physical_channels ||
a1.i_original_channels != a2.i_original_channels )
return false;
--
2.9.3
More information about the vlc-devel
mailing list