diff options
author | Torsten Jager <t.jager@gmx.de> | 2013-03-27 22:45:22 +0000 |
---|---|---|
committer | Torsten Jager <t.jager@gmx.de> | 2013-03-27 22:45:22 +0000 |
commit | 654f2f29dbdd4d40f7a1e59e606a34fa6f81e6a8 (patch) | |
tree | b7049230826cd65505e37333237941021f1295e3 /src/combined/ffmpeg/ff_audio_decoder.c | |
parent | 1d2563d837f1cdb305727cf42a1457a4448a3de0 (diff) | |
download | xine-lib-654f2f29dbdd4d40f7a1e59e606a34fa6f81e6a8.tar.gz xine-lib-654f2f29dbdd4d40f7a1e59e606a34fa6f81e6a8.tar.bz2 |
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.
Diffstat (limited to 'src/combined/ffmpeg/ff_audio_decoder.c')
-rw-r--r-- | src/combined/ffmpeg/ff_audio_decoder.c | 15 |
1 files changed, 7 insertions, 8 deletions
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) { |