diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/combined/ffmpeg/ff_audio_decoder.c | 2 | ||||
-rw-r--r-- | src/combined/ffmpeg/ffmpeg_decoder.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/combined/ffmpeg/ff_audio_decoder.c b/src/combined/ffmpeg/ff_audio_decoder.c index b3b54ab0a..c2e3740e3 100644 --- a/src/combined/ffmpeg/ff_audio_decoder.c +++ b/src/combined/ffmpeg/ff_audio_decoder.c @@ -322,7 +322,7 @@ static void ff_audio_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) if (!this->output_open) { if (!this->audio_bits || !this->audio_sample_rate || !this->audio_channels) { - avcodec_decode_audio (this->context, + avcodec_decode_audio2 (this->context, (int16_t *)this->decode_buffer, &decode_buffer_size, &this->buf[0], diff --git a/src/combined/ffmpeg/ffmpeg_decoder.h b/src/combined/ffmpeg/ffmpeg_decoder.h index f47421253..0f4ff1f1e 100644 --- a/src/combined/ffmpeg/ffmpeg_decoder.h +++ b/src/combined/ffmpeg/ffmpeg_decoder.h @@ -33,6 +33,10 @@ # include "../../libffmpeg/libavcodec/avcodec.h" #endif +#if LIBAVCODEC_VERSION_MAJOR > 51 +#define bits_per_sample bits_per_coded_sample +#endif + typedef struct ff_codec_s { uint32_t type; enum CodecID id; |