vlc | branch: master | Francois Cartegnie <[email protected]> | Fri Jun  2 
10:52:52 2017 +0200| [116df7fad926302a2782ed87e8d6788ce581d5c4] | committer: 
Francois Cartegnie

codec: opus: check extradata header

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

 modules/codec/opus.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/codec/opus.c b/modules/codec/opus.c
index 71b9b165bc..ca136cb36a 100644
--- a/modules/codec/opus.c
+++ b/modules/codec/opus.c
@@ -264,7 +264,8 @@ static int ProcessHeaders( decoder_t *p_dec )
 
     /* If we have no header (e.g. from RTP), make one. */
     bool b_dummy_header = false;
-    if( !i_extra )
+    if( !i_extra ||
+        (i_extra > 10 && memcmp( &p_extra[2], "OpusHead", 8 )) ) /* Borked 
muxers */
     {
         OpusHeader header;
         opus_prepare_header( p_dec->fmt_in.audio.i_channels,

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to