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/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio/audio.c') diff --git a/audio/audio.c b/audio/audio.c index 57096eaa38..8589104137 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -31,7 +31,7 @@ static void update_redundant_info(struct mp_audio *mpa) assert(mp_chmap_is_empty(&mpa->channels) || mp_chmap_is_valid(&mpa->channels)); mpa->nch = mpa->channels.num; - mpa->bps = af_fmt2bits(mpa->format) / 8; + mpa->bps = af_fmt2bps(mpa->format); if (af_fmt_is_planar(mpa->format)) { mpa->spf = 1; mpa->num_planes = mpa->nch; -- cgit v1.2.3