X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fcodec%2Fmpeg_audio.c;h=8cec9996b85736d75e93e3b811edac988915052e;hb=d6a720cb351211eb36303f18340a9889223f6f7e;hp=2a1d1a1fcd6fa5789565e8a2d457ed912ee4a167;hpb=d06602cf449f3cf0f817602980d5f44497c713fc;p=vlc diff --git a/modules/codec/mpeg_audio.c b/modules/codec/mpeg_audio.c index 2a1d1a1fcd..8cec9996b8 100644 --- a/modules/codec/mpeg_audio.c +++ b/modules/codec/mpeg_audio.c @@ -1,13 +1,13 @@ /***************************************************************************** * mpeg_audio.c: parse MPEG audio sync info and packetize the stream ***************************************************************************** - * Copyright (C) 2001-2003 VideoLAN + * Copyright (C) 2001-2003 the VideoLAN team * $Id$ * * Authors: Laurent Aimar * Eric Petit * Christophe Massiot - * Gildas Bazin + * Gildas Bazin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -132,6 +132,13 @@ static int OpenDecoder( vlc_object_t *p_this ) return VLC_EGENERIC; } + /* HACK: Don't use this codec if we don't have an mpga audio filter */ + if( p_dec->i_object_type == VLC_OBJECT_DECODER && + !config_FindModule( p_this, "mpgatofixed32" ) ) + { + return VLC_EGENERIC; + } + /* Allocate the memory needed to store the decoder's structure */ if( ( p_dec->p_sys = p_sys = (decoder_sys_t *)malloc(sizeof(decoder_sys_t)) ) == NULL ) @@ -196,7 +203,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) return NULL; } - if( (*pp_block)->i_flags&BLOCK_FLAG_DISCONTINUITY ) + if( (*pp_block)->i_flags&(BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED) ) { p_sys->i_state = STATE_NOSYNC; } @@ -466,7 +473,7 @@ static uint8_t *GetOutBuffer( decoder_t *p_dec, void **pp_out_buffer ) if( p_dec->fmt_out.audio.i_rate != p_sys->i_rate ) { - msg_Info( p_dec, "MPGA channels:%d samplerate:%d bitrate:%d", + msg_Dbg( p_dec, "MPGA channels:%d samplerate:%d bitrate:%d", p_sys->i_channels, p_sys->i_rate, p_sys->i_bit_rate ); aout_DateInit( &p_sys->end_date, p_sys->i_rate );