summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_lavc.c
diff options
context:
space:
mode:
authorMarcoen Hirschberg <m.hirschberg@activevideo.com>2014-05-27 08:21:18 +0200
committerwm4 <wm4@nowhere>2014-05-28 21:38:00 +0200
commit31a10f7c38887294af758d21a19596b7772f328a (patch)
tree545cd862c7bd4cc6c916e91f5a4d69fa586170be /audio/out/ao_lavc.c
parent434242adb5dc045faf16f8bb19aa740732cc3345 (diff)
downloadmpv-31a10f7c38887294af758d21a19596b7772f328a.tar.bz2
mpv-31a10f7c38887294af758d21a19596b7772f328a.tar.xz
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.
Diffstat (limited to 'audio/out/ao_lavc.c')
-rw-r--r--audio/out/ao_lavc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/out/ao_lavc.c b/audio/out/ao_lavc.c
index 0bfe2eb9cb..7eb81f1d4e 100644
--- a/audio/out/ao_lavc.c
+++ b/audio/out/ao_lavc.c
@@ -137,7 +137,7 @@ static int init(struct ao *ao)
select_format(ao, codec);
- ac->sample_size = af_fmt2bits(ao->format) / 8;
+ ac->sample_size = af_fmt2bps(ao->format);
ac->stream->codec->sample_fmt = af_to_avformat(ao->format);
ac->stream->codec->bits_per_raw_sample = ac->sample_size * 8;