From cc276c85d15272df6e44fb3252657a43cbd49555 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Fri, 25 Nov 2011 12:51:57 +0000 Subject: Make channel layout masks unsigned It makes more sense for a bit mask to use an unsigned type. The change should be source and binary compatible on all supported systems, hence micro version bump. Fixes a few invalid shifts. Signed-off-by: Mans Rullgard --- libavcodec/ac3enc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libavcodec/ac3enc.c') diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index c1564d2a3a..b8e23e49f6 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -77,7 +77,7 @@ static uint8_t exponent_group_tab[2][3][256]; /** * List of supported channel layouts. */ -const int64_t ff_ac3_channel_layouts[19] = { +const uint64_t ff_ac3_channel_layouts[19] = { AV_CH_LAYOUT_MONO, AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_2_1, @@ -2063,13 +2063,13 @@ av_cold int ff_ac3_encode_close(AVCodecContext *avctx) * Set channel information during initialization. */ static av_cold int set_channel_info(AC3EncodeContext *s, int channels, - int64_t *channel_layout) + uint64_t *channel_layout) { int ch_layout; if (channels < 1 || channels > AC3_MAX_CHANNELS) return AVERROR(EINVAL); - if ((uint64_t)*channel_layout > 0x7FF) + if (*channel_layout > 0x7FF) return AVERROR(EINVAL); ch_layout = *channel_layout; if (!ch_layout) -- cgit v1.2.3