From 49e9d64f0d3b0c07982ba50033fdda6871a36c3a Mon Sep 17 00:00:00 2001 From: Laurent Aimar Date: Sat, 20 Feb 2010 13:01:20 +0100 Subject: [PATCH] Fixed theora/speex workaround (avformat). --- modules/demux/avformat/demux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c index 572eedc2b3..eac5c5eeb2 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, -- 2.39.5