mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 23:55:57 -05:00
libav 0.7: Switch from av_get_bits_per_sample_format() to ..._fmt()
This commit is contained in:
parent
ecf064082f
commit
b1d31feb53
@ -402,7 +402,11 @@ scan_metadata_ffmpeg(char *file, struct media_file_info *mfi)
|
||||
mfi->samplerate = audio_stream->codec->sample_rate;
|
||||
|
||||
/* Try sample format first */
|
||||
#if LIBAVCODEC_VERSION_MAJOR >= 53
|
||||
mfi->bits_per_sample = av_get_bits_per_sample_fmt(audio_stream->codec->sample_fmt);
|
||||
#else
|
||||
mfi->bits_per_sample = av_get_bits_per_sample_format(audio_stream->codec->sample_fmt);
|
||||
#endif
|
||||
if (mfi->bits_per_sample == 0)
|
||||
{
|
||||
/* Try codec */
|
||||
|
@ -450,7 +450,11 @@ transcode_setup(struct media_file_info *mfi, off_t *est_size, int wavhdr)
|
||||
}
|
||||
|
||||
ctx->need_resample = 1;
|
||||
#if LIBAVCODEC_VERSION_MAJOR >= 53
|
||||
ctx->input_size = ctx->acodec->channels * av_get_bits_per_sample_fmt(ctx->acodec->sample_fmt) / 8;
|
||||
#else
|
||||
ctx->input_size = ctx->acodec->channels * av_get_bits_per_sample_format(ctx->acodec->sample_fmt) / 8;
|
||||
#endif
|
||||
}
|
||||
|
||||
ctx->duration = mfi->song_length;
|
||||
|
Loading…
Reference in New Issue
Block a user