summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/ad_ffmpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmpcodecs/ad_ffmpeg.c')
-rw-r--r--libmpcodecs/ad_ffmpeg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c
index 762c80282d..e76c536957 100644
--- a/libmpcodecs/ad_ffmpeg.c
+++ b/libmpcodecs/ad_ffmpeg.c
@@ -281,8 +281,7 @@ static int decode_audio(sh_audio_t *sh_audio, unsigned char *buf, int minlen,
}
if (len2 > 0) {
if (avctx->channels >= 5) {
- int samplesize = av_get_bits_per_sample_format(
- avctx->sample_fmt) / 8;
+ int samplesize = av_get_bytes_per_sample(avctx->sample_fmt);
reorder_channel_nch(buf, AF_CHANNEL_LAYOUT_LAVC_DEFAULT,
AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT,
avctx->channels,