[vlc-devel] commit: Fixed theora/speex workaround (avformat). (Laurent Aimar )

git version control git at videolan.org
Sat Feb 20 14:13:07 CET 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Feb 20 13:01:20 2010 +0100| [49e9d64f0d3b0c07982ba50033fdda6871a36c3a] | committer: Laurent Aimar 

Fixed theora/speex workaround (avformat).

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

 modules/demux/avformat/demux.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index 572eedc..eac5c5e 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -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,




More information about the vlc-devel mailing list