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. --- stream/tv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stream/tv.c') diff --git a/stream/tv.c b/stream/tv.c index 77279e4bcd..c7017f4471 100644 --- a/stream/tv.c +++ b/stream/tv.c @@ -802,7 +802,7 @@ static int demux_open_tv(demuxer_t *demuxer, enum demux_check check) sh_a->codec = "mp-pcm"; sh_a->format = audio_format; - int samplesize = af_fmt2bits(audio_format) / 8; + int samplesize = af_fmt2bps(audio_format); int block_align = samplesize * sh_audio->channels.num; int bytes_per_second = sh_audio->samplerate * block_align; -- cgit v1.2.3