From 31a10f7c38887294af758d21a19596b7772f328a Mon Sep 17 00:00:00 2001 From: Marcoen Hirschberg Date: Tue, 27 May 2014 08:21:18 +0200 Subject: af_fmt2bits: change to af_fmt2bps (bytes/sample) where appropriate In most places where af_fmt2bits is called to get the bits/sample, the result is immediately converted to bytes/sample. Avoid this by getting bytes/sample directly by introducing af_fmt2bps. --- audio/decode/ad_mpg123.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio/decode/ad_mpg123.c') diff --git a/audio/decode/ad_mpg123.c b/audio/decode/ad_mpg123.c index 7b174aa0d6..ec4dc04485 100644 --- a/audio/decode/ad_mpg123.c +++ b/audio/decode/ad_mpg123.c @@ -160,7 +160,7 @@ static int set_format(struct dec_audio *da) return MPG123_ERR; } mp_audio_set_format(&da->decoded, af); - con->sample_size = channels * (af_fmt2bits(af) / 8); + con->sample_size = channels * af_fmt2bps(af); con->new_format = 0; } return ret; -- cgit v1.2.3