[vlc-commits] ES: similar audio format have the same channel_type

Adrien Maglo git at videolan.org
Wed Jul 19 18:57:12 CEST 2017


vlc | branch: master | Adrien Maglo <magsoft at videolan.org> | Thu Mar 16 09:37:09 2017 +0100| [7f58c002ed17ddedea54f10b38f30a950c1d4f20] | committer: Thomas Guillem

ES: similar audio format have the same channel_type

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 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 bac3de447e..fd9cbf7576 100644
--- a/include/vlc_aout.h
+++ b/include/vlc_aout.h
@@ -66,6 +66,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_chan_mode == (p_second)->i_chan_mode) )
 
diff --git a/src/misc/es_format.c b/src/misc/es_format.c
index b37a354188..ccf6d5c46b 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.channel_type != a2.channel_type ||
+            a1.i_rate != a2.i_rate ||
             a1.i_channels != a2.i_channels ||
             a1.i_physical_channels != a2.i_physical_channels ||
             a1.i_chan_mode != a2.i_chan_mode )



More information about the vlc-commits mailing list