diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-10-21 14:36:38 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-11-01 11:29:15 -0400 |
commit | 7efbba2e3665285207bf769b8f0d712cedf1bfd9 (patch) | |
tree | 2f44ee776c6a3d79d3a2d4358914bdbfd30ca09c /libavcodec/cook.c | |
parent | d21b2e4726822ec1c604e2b9010a1a2cc0d88aec (diff) | |
download | ffmpeg-7efbba2e3665285207bf769b8f0d712cedf1bfd9.tar.gz |
cook: use av_get_channel_layout_nb_channels() instead of cook_count_channels()
Diffstat (limited to 'libavcodec/cook.c')
-rw-r--r-- | libavcodec/cook.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 211fe12d72..152471947f 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -1034,16 +1034,6 @@ static void dump_cook_context(COOKContext *q) } #endif -static av_cold int cook_count_channels(unsigned int mask) -{ - int i; - int channels = 0; - for (i = 0; i < 32; i++) - if (mask & (1 << i)) - ++channels; - return channels; -} - /** * Cook initialization * @@ -1147,7 +1137,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) if (extradata_size >= 4) channel_mask |= q->subpacket[s].channel_mask = bytestream_get_be32(&edata_ptr); - if (cook_count_channels(q->subpacket[s].channel_mask) > 1) { + if (av_get_channel_layout_nb_channels(q->subpacket[s].channel_mask) > 1) { q->subpacket[s].total_subbands = q->subpacket[s].subbands + q->subpacket[s].js_subband_start; q->subpacket[s].joint_stereo = 1; |