From 654f2f29dbdd4d40f7a1e59e606a34fa6f81e6a8 Mon Sep 17 00:00:00 2001 From: Torsten Jager Date: Wed, 27 Mar 2013 22:45:22 +0000 Subject: Reenable MPEG4 audio with fix for failure case. Audio out was opened with bogus settings (1Hz != 0) which failed. This prevented a retry after first audio frame came in and corrected the settings (48k/6 channels). Once ao _is_ open successfully, everything works same as before, including further stream conf changes. --- src/combined/ffmpeg/ff_audio_decoder.c | 15 +++++++-------- src/combined/ffmpeg/xine_audio.list | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/combined/ffmpeg/ff_audio_decoder.c b/src/combined/ffmpeg/ff_audio_decoder.c index 20e4c5d57..205a64370 100644 --- a/src/combined/ffmpeg/ff_audio_decoder.c +++ b/src/combined/ffmpeg/ff_audio_decoder.c @@ -581,14 +581,13 @@ static void ff_audio_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) return; } - if (this->output_open) { - if (this->audio_bits != this->context->bits_per_sample || - this->audio_sample_rate != this->context->sample_rate || - this->audio_channels != this->context->channels) { - xprintf(this->stream->xine, XINE_VERBOSITY_LOG, - _("ffmpeg_audio_dec: codec parameters changed\n")); - ff_audio_output_close(this); - } + if (this->audio_bits != this->context->bits_per_sample || + this->audio_sample_rate != this->context->sample_rate || + this->audio_channels != this->context->channels) { + xprintf(this->stream->xine, XINE_VERBOSITY_LOG, + _("ffmpeg_audio_dec: codec parameters changed\n")); + /* close if it was open, and always trigger 1 new open attempt below */ + ff_audio_output_close(this); } if (!this->output_open) { diff --git a/src/combined/ffmpeg/xine_audio.list b/src/combined/ffmpeg/xine_audio.list index 8a40c29cb..e44f6ac09 100644 --- a/src/combined/ffmpeg/xine_audio.list +++ b/src/combined/ffmpeg/xine_audio.list @@ -41,10 +41,10 @@ WAVPACK WAVPACK WavPack AMR_NB AMR_NB AMR narrow band AMR_WB AMR_WB AMR wide band EAC3 EAC3 E-AC-3 +AAC AAC MPEG4 AAC_LATM AAC_LATM AAC LATM # disabled codecs (ref. configure.ac) -! AAC ! AC3 ! ADPCM_ADX ! ADPCM_G726 -- cgit v1.2.3