]> git.sesse.net Git - vlc/commitdiff
Fixed theora/speex workaround (avformat).
authorLaurent Aimar <fenrir@videolan.org>
Sat, 20 Feb 2010 12:01:20 +0000 (13:01 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 20 Feb 2010 13:11:25 +0000 (14:11 +0100)
modules/demux/avformat/demux.c

index 572eedc2b3b946b099abad8448512db153834a47..eac5c5eeb25d6b2e0eb07fb7b15909ab439d0a87 100644 (file)
@@ -342,10 +342,11 @@ int OpenDemux( vlc_object_t *p_this )
         if( cc->codec_type != CODEC_TYPE_ATTACHMENT )
 #endif
         {
+            const bool    b_ogg = !strcmp( p_sys->fmt->name, "ogg" );
             const uint8_t *p_extra = cc->extradata;
             unsigned      i_extra  = cc->extradata_size;
 
-            if( cc->codec_id == CODEC_ID_THEORA )
+            if( cc->codec_id == CODEC_ID_THEORA && b_ogg )
             {
                 unsigned pi_size[3];
                 void     *pp_data[3];
@@ -369,7 +370,7 @@ int OpenDemux( vlc_object_t *p_this )
                     fmt.p_extra = NULL;
                 }
             }
-            else if( cc->codec_id == CODEC_ID_SPEEX )
+            else if( cc->codec_id == CODEC_ID_SPEEX && b_ogg )
             {
                 uint8_t p_dummy_comment[] = {
                     0, 0, 0, 0,