[vlc-commits] packetizer: a52: fix parser matching (refs #18002)

Francois Cartegnie git at videolan.org
Fri Feb 10 15:26:25 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Feb 10 15:25:30 2017 +0100| [4bc872d4937311832f82c4d9646556e07c63eee7] | committer: Francois Cartegnie

packetizer: a52: fix parser matching (refs #18002)

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

 modules/packetizer/a52.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/packetizer/a52.h b/modules/packetizer/a52.h
index 2280119..3faf243 100644
--- a/modules/packetizer/a52.h
+++ b/modules/packetizer/a52.h
@@ -260,12 +260,14 @@ static inline int vlc_a52_header_Parse( vlc_a52_header_t *p_header,
     const int bsid = p_buffer[5] >> 3;
 
     /* cf. Annex E 2.3.1.6 of AC3 spec */
-    if( bsid > 10 && bsid <= 16 )
+    if( bsid <= 10 )
+        return vlc_a52_header_ParseAc3( p_header, p_buffer,
+                                        p_acmod, pi_fscod_samplerates );
+    else if( bsid <= 16 )
         return vlc_a52_header_ParseEac3( p_header, p_buffer,
                                          p_acmod, pi_fscod_samplerates );
     else
-        return vlc_a52_header_ParseAc3( p_header, p_buffer,
-                                        p_acmod, pi_fscod_samplerates );
+        return VLC_EGENERIC;
 }
 
 #endif



More information about the vlc-commits mailing list