[vlc-commits] codec: opus: check extradata header
    Francois Cartegnie 
    git at videolan.org
       
    Mon Jun  5 16:48:08 CEST 2017
    
    
  
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | 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,
    
    
More information about the vlc-commits
mailing list