From: Petri H. <phi...@us...> - 2011-09-28 09:18:28
|
# HG changeset patch # User Petri Hintukainen <phi...@us...> # Date 1317124970 -10800 # Node ID 699fb5c35b0c896495c8ca3ee59c19beb66fd493 # Parent 7b68241cca27e97605b786888911aec8daf93fb9 ff_audio_open_codec(): initialize codec if it hasn't been initialized. This makes HEADERS optional for codecs that don't require extradata. diff --git a/src/combined/ffmpeg/ff_audio_decoder.c b/src/combined/ffmpeg/ff_audio_decoder.c --- a/src/combined/ffmpeg/ff_audio_decoder.c +++ b/src/combined/ffmpeg/ff_audio_decoder.c @@ -170,6 +170,10 @@ static void ff_audio_init_codec(ff_audio static int ff_audio_open_codec(ff_audio_decoder_t *this, unsigned int codec_type) { if ( !this->codec ) { + ff_audio_init_codec(this, codec_type); + } + + if ( !this->codec ) { xprintf (this->stream->xine, XINE_VERBOSITY_LOG, _("ffmpeg_audio_dec: trying to open null codec\n")); _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0); |