[vlc-devel] [PATCH 02/16] ES: similar audio format have the same channel_type

Thomas Guillem thomas at gllm.fr
Fri Jul 7 16:02:48 CEST 2017


From: Adrien Maglo <magsoft at videolan.org>

Signed-off-by: Thomas Guillem <thomas at gllm.fr>
---
 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 458ed606f8..647cb3bafd 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)->channels_type == (p_second)->channels_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 a436599058..15a9606ca1 100644
--- a/src/misc/es_format.c
+++ b/src/misc/es_format.c
@@ -580,7 +580,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.channels_type != a2.channels_type ||
+            a1.i_rate != a2.i_rate ||
             a1.i_channels != a2.i_channels ||
             a1.i_physical_channels != a2.i_physical_channels ||
             a1.i_original_channels != a2.i_original_channels )
-- 
2.11.0



More information about the vlc-devel mailing list