mpd/src/decoder/plugins
Max Kellermann 6c602811df decoder/ffmepg: fill AudioFormat from AVCodecContext, not AVCodecParameters
`AVCodecParameters` contains values from the codec detected by
avformat_find_stream_info(), but after avcodec_open2(), a different
codec might be selected with a different `AVSampleFormat`.  This leads
to misinterpretation of data returned from FFmpeg, leading to random
noise or silence.

This was observed with FFmpeg 4.0.2 and a TS container file containing
MP2.  A mp3-float codec was detected returning `AV_SAMPLE_FMT_FLTP`,
but finally the `mpegaudiodec_fixed.c` was used, returning
`AV_SAMPLE_FMT_S16`.

By using the audio format from `AVCodecContext`, we ensure that MPD
and FFmpeg always agree on the actual audio format in the buffer.

This removes the FFmpeg bug workaround from commit e1b032cbad which I
assume is obsolete after 7 years.

Fixes #380
2018-11-04 22:30:50 +01:00
..
AdPlugDecoderPlugin.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
AdPlugDecoderPlugin.h *: copyright year 2018 2018-10-31 17:54:59 +01:00
AudiofileDecoderPlugin.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
AudiofileDecoderPlugin.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
DsdiffDecoderPlugin.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
DsdiffDecoderPlugin.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
DsdLib.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
DsdLib.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
DsfDecoderPlugin.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
DsfDecoderPlugin.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
FaadDecoderPlugin.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
FaadDecoderPlugin.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
FfmpegDecoderPlugin.cxx decoder/ffmepg: fill AudioFormat from AVCodecContext, not AVCodecParameters 2018-11-04 22:30:50 +01:00
FfmpegDecoderPlugin.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
FfmpegIo.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
FfmpegIo.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
FfmpegMetaData.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
FfmpegMetaData.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
FlacCommon.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
FlacCommon.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
FlacDecoderPlugin.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
FlacDecoderPlugin.h *: copyright year 2018 2018-10-31 17:54:59 +01:00
FlacDomain.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
FlacDomain.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
FlacInput.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
FlacInput.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
FlacPcm.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
FlacPcm.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
FlacStreamDecoder.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
FluidsynthDecoderPlugin.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
FluidsynthDecoderPlugin.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
GmeDecoderPlugin.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
GmeDecoderPlugin.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
HybridDsdDecoderPlugin.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
HybridDsdDecoderPlugin.hxx decoder/HybridDSD: new decoder plugin for Hybrid DSD 2018-02-13 00:00:00 +01:00
MadDecoderPlugin.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
MadDecoderPlugin.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
meson.build build with Meson instead of autotools 2018-10-14 23:41:38 +02:00
MikmodDecoderPlugin.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
MikmodDecoderPlugin.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
ModplugDecoderPlugin.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
ModplugDecoderPlugin.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
MpcdecDecoderPlugin.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
MpcdecDecoderPlugin.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
Mpg123DecoderPlugin.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
Mpg123DecoderPlugin.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
OggCodec.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
OggCodec.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
OggDecoder.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
OggDecoder.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
OpusDecoderPlugin.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
OpusDecoderPlugin.h *: copyright year 2018 2018-10-31 17:54:59 +01:00
OpusDomain.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
OpusDomain.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
OpusHead.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
OpusHead.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
OpusReader.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
OpusTags.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
OpusTags.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
PcmDecoderPlugin.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
PcmDecoderPlugin.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
SidplayDecoderPlugin.cxx decoder/sidplay: fix typo to avoid linker error with meson (libsidplayfp) 2018-10-16 14:56:40 +02:00
SidplayDecoderPlugin.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
SndfileDecoderPlugin.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
SndfileDecoderPlugin.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
VorbisDecoderPlugin.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
VorbisDecoderPlugin.h *: copyright year 2018 2018-10-31 17:54:59 +01:00
VorbisDomain.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
VorbisDomain.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
WavpackDecoderPlugin.cxx decoder/wavpack: fix warning 'unused variable is_dsd' when compiled with --enable-dsd=no 2018-10-12 01:02:34 +02:00
WavpackDecoderPlugin.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
WildmidiDecoderPlugin.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
WildmidiDecoderPlugin.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00