From 2ae5c07dc74b7771557de4c171d610e9d137da60 Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Tue, 27 Sep 2011 15:02:50 +0300 Subject: ff_audio_open_codec(): initialize codec if it hasn't been initialized. This makes HEADERS optional for codecs that don't require extradata. imported patch 10124.diff --- src/combined/ffmpeg/ff_audio_decoder.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/combined/ffmpeg') diff --git a/src/combined/ffmpeg/ff_audio_decoder.c b/src/combined/ffmpeg/ff_audio_decoder.c index 0bd947d42..31287fd3d 100644 --- a/src/combined/ffmpeg/ff_audio_decoder.c +++ b/src/combined/ffmpeg/ff_audio_decoder.c @@ -169,6 +169,10 @@ static void ff_audio_init_codec(ff_audio_decoder_t *this, unsigned int codec_typ 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")); -- cgit v1.2.3