summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/audioconvert.c12
-rw-r--r--libavutil/audioconvert.h8
-rw-r--r--libavutil/avutil.h2
-rw-r--r--libavutil/common.h4
4 files changed, 13 insertions, 13 deletions
diff --git a/libavutil/audioconvert.c b/libavutil/audioconvert.c
index 30f6074e2a..c4cab22fce 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 },
@@ -76,7 +76,7 @@ static const struct {
{ 0 }
};
-static int64_t get_channel_layout_single(const char *name, int name_len)
+static uint64_t get_channel_layout_single(const char *name, int name_len)
{
int i;
char *end;
@@ -102,7 +102,7 @@ static int64_t get_channel_layout_single(const char *name, int name_len)
return 0;
}
-int64_t av_get_channel_layout(const char *name)
+uint64_t av_get_channel_layout(const char *name)
{
const char *n, *e;
const char *name_end = name + strlen(name);
@@ -119,7 +119,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;
@@ -138,7 +138,7 @@ void av_get_channel_layout_string(char *buf, int buf_size,
int i, ch;
av_strlcat(buf, " (", buf_size);
for (i = 0, ch = 0; i < 64; i++) {
- if ((channel_layout & (1L << i))) {
+ if ((channel_layout & (UINT64_C(1) << i))) {
const char *name = get_channel_name(i);
if (name) {
if (ch > 0)
@@ -152,7 +152,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 766ef8b9da..d0232d2aa3 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
/**
* @}
@@ -104,7 +104,7 @@
* AV_CH_* macros).
+ Example: "stereo+FC" = "2+FC" = "2c+1c" = "0x7"
*/
-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.
@@ -113,12 +113,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);
/**
* Return default channel layout for a given number of channels.
diff --git a/libavutil/avutil.h b/libavutil/avutil.h
index a09fe9417b..30fae0aa93 100644
--- a/libavutil/avutil.h
+++ b/libavutil/avutil.h
@@ -154,7 +154,7 @@
#define LIBAVUTIL_VERSION_MAJOR 51
#define LIBAVUTIL_VERSION_MINOR 29
-#define LIBAVUTIL_VERSION_MICRO 0
+#define LIBAVUTIL_VERSION_MICRO 1
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
diff --git a/libavutil/common.h b/libavutil/common.h
index d60e8638a5..cf361ca15e 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -220,8 +220,8 @@ static av_always_inline av_const int av_popcount_c(uint32_t x)
return (x + (x >> 16)) & 0x3F;
}
-#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
-#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((a) << 24))
+#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24))
+#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24))
/**
* Convert a UTF-8 character (up to 4 bytes) to its 32-bit UCS-4 encoded form.