diff options
author | Mans Rullgard <mans@mansr.com> | 2011-11-25 12:51:57 +0000 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-11-25 13:19:54 +0000 |
commit | cc276c85d15272df6e44fb3252657a43cbd49555 (patch) | |
tree | baed10d2966866ed98d9887cd437cc43e009329f /libavutil | |
parent | 00a856e3f95214c54a878b7cbd6e8ae8c5ce3ca9 (diff) | |
download | ffmpeg-cc276c85d15272df6e44fb3252657a43cbd49555.tar.gz |
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 <mans@mansr.com>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/audioconvert.c | 8 | ||||
-rw-r--r-- | libavutil/audioconvert.h | 8 | ||||
-rw-r--r-- | libavutil/avutil.h | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/libavutil/audioconvert.c b/libavutil/audioconvert.c index 7250e36d90..52656c7302 100644 --- a/libavutil/audioconvert.c +++ b/libavutil/audioconvert.c @@ -60,7 +60,7 @@ static const char *get_channel_name(int channel_id) static const struct { const char *name; int nb_channels; - int64_t layout; + uint64_t layout; } channel_layout_map[] = { { "mono", 1, AV_CH_LAYOUT_MONO }, { "stereo", 2, AV_CH_LAYOUT_STEREO }, @@ -77,7 +77,7 @@ static const struct { { 0 } }; -int64_t av_get_channel_layout(const char *name) +uint64_t av_get_channel_layout(const char *name) { int i = 0; do { @@ -90,7 +90,7 @@ int64_t av_get_channel_layout(const char *name) } void av_get_channel_layout_string(char *buf, int buf_size, - int nb_channels, int64_t channel_layout) + int nb_channels, uint64_t channel_layout) { int i; @@ -123,7 +123,7 @@ void av_get_channel_layout_string(char *buf, int buf_size, } } -int av_get_channel_layout_nb_channels(int64_t channel_layout) +int av_get_channel_layout_nb_channels(uint64_t channel_layout) { int count; uint64_t x = channel_layout; diff --git a/libavutil/audioconvert.h b/libavutil/audioconvert.h index 1c5cfa0a8e..54b13b2bea 100644 --- a/libavutil/audioconvert.h +++ b/libavutil/audioconvert.h @@ -62,7 +62,7 @@ /** Channel mask value used for AVCodecContext.request_channel_layout to indicate that the user requests the channel order of the decoder output to be the native codec channel order. */ -#define AV_CH_LAYOUT_NATIVE 0x8000000000000000LL +#define AV_CH_LAYOUT_NATIVE 0x8000000000000000ULL /** * @} @@ -92,7 +92,7 @@ /** * Return a channel layout id that matches name, 0 if no match. */ -int64_t av_get_channel_layout(const char *name); +uint64_t av_get_channel_layout(const char *name); /** * Return a description of a channel layout. @@ -101,12 +101,12 @@ int64_t av_get_channel_layout(const char *name); * @param buf put here the string containing the channel layout * @param buf_size size in bytes of the buffer */ -void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, int64_t channel_layout); +void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout); /** * Return the number of channels in the channel layout. */ -int av_get_channel_layout_nb_channels(int64_t channel_layout); +int av_get_channel_layout_nb_channels(uint64_t channel_layout); /** * @} diff --git a/libavutil/avutil.h b/libavutil/avutil.h index a2d3073467..0400d939c6 100644 --- a/libavutil/avutil.h +++ b/libavutil/avutil.h @@ -154,7 +154,7 @@ #define LIBAVUTIL_VERSION_MAJOR 51 #define LIBAVUTIL_VERSION_MINOR 19 -#define LIBAVUTIL_VERSION_MICRO 0 +#define LIBAVUTIL_VERSION_MICRO 1 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ LIBAVUTIL_VERSION_MINOR, \ |