mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
Merge commit 'efa7f4202088c70caba11d7834641bc6eaf41830'
* commit 'efa7f4202088c70caba11d7834641bc6eaf41830': Use the avstring.h locale-independent character type functions avstring: Add locale independent versions of some ctype.h functions Conflicts: avprobe.c doc/APIchanges libavcodec/dvdsubdec.c libavcodec/utils.c libavutil/avstring.c libavutil/avstring.h libavutil/eval.c libavutil/parseutils.c libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
6c17ff84ad
@ -144,6 +144,9 @@ API changes, most recent first:
|
|||||||
2012-03-26 - a67d9cf - lavfi 2.66.100
|
2012-03-26 - a67d9cf - lavfi 2.66.100
|
||||||
Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.
|
Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.
|
||||||
|
|
||||||
|
2013-xx-xx - xxxxxxx - lavu 52.8.0 - avstring.h
|
||||||
|
Add av_isdigit, av_isgraph, av_isspace, av_isxdigit.
|
||||||
|
|
||||||
2013-xx-xx - xxxxxxx - lavfi 3.4.0 - avfiltergraph.h
|
2013-xx-xx - xxxxxxx - lavfi 3.4.0 - avfiltergraph.h
|
||||||
Add resample_lavr_opts to AVFilterGraph for setting libavresample options
|
Add resample_lavr_opts to AVFilterGraph for setting libavresample options
|
||||||
for auto-inserted resample filters.
|
for auto-inserted resample filters.
|
||||||
|
@ -2777,10 +2777,10 @@ int avpriv_unlock_avformat(void)
|
|||||||
|
|
||||||
unsigned int avpriv_toupper4(unsigned int x)
|
unsigned int avpriv_toupper4(unsigned int x)
|
||||||
{
|
{
|
||||||
return av_toupper(x & 0xFF)
|
return av_toupper(x & 0xFF) +
|
||||||
+ (av_toupper((x >> 8) & 0xFF) << 8)
|
(av_toupper((x >> 8) & 0xFF) << 8) +
|
||||||
+ (av_toupper((x >> 16) & 0xFF) << 16)
|
(av_toupper((x >> 16) & 0xFF) << 16) +
|
||||||
+ (av_toupper((x >> 24) & 0xFF) << 24);
|
(av_toupper((x >> 24) & 0xFF) << 24);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !HAVE_THREADS
|
#if !HAVE_THREADS
|
||||||
|
@ -149,17 +149,17 @@ static av_cold int channelmap_init(AVFilterContext *ctx, const char *args)
|
|||||||
} else {
|
} else {
|
||||||
char *dash = strchr(mapping, '-');
|
char *dash = strchr(mapping, '-');
|
||||||
if (!dash) { // short mapping
|
if (!dash) { // short mapping
|
||||||
if (isdigit(*mapping))
|
if (av_isdigit(*mapping))
|
||||||
mode = MAP_ONE_INT;
|
mode = MAP_ONE_INT;
|
||||||
else
|
else
|
||||||
mode = MAP_ONE_STR;
|
mode = MAP_ONE_STR;
|
||||||
} else if (isdigit(*mapping)) {
|
} else if (av_isdigit(*mapping)) {
|
||||||
if (isdigit(*(dash+1)))
|
if (av_isdigit(*(dash+1)))
|
||||||
mode = MAP_PAIR_INT_INT;
|
mode = MAP_PAIR_INT_INT;
|
||||||
else
|
else
|
||||||
mode = MAP_PAIR_INT_STR;
|
mode = MAP_PAIR_INT_STR;
|
||||||
} else {
|
} else {
|
||||||
if (isdigit(*(dash+1)))
|
if (av_isdigit(*(dash+1)))
|
||||||
mode = MAP_PAIR_STR_INT;
|
mode = MAP_PAIR_STR_INT;
|
||||||
else
|
else
|
||||||
mode = MAP_PAIR_STR_STR;
|
mode = MAP_PAIR_STR_STR;
|
||||||
|
@ -285,6 +285,28 @@ int av_escape(char **dst, const char *src, const char *special_chars,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int av_isdigit(int c)
|
||||||
|
{
|
||||||
|
return c >= '0' && c <= '9';
|
||||||
|
}
|
||||||
|
|
||||||
|
int av_isgraph(int c)
|
||||||
|
{
|
||||||
|
return c > 32 && c < 127;
|
||||||
|
}
|
||||||
|
|
||||||
|
int av_isspace(int c)
|
||||||
|
{
|
||||||
|
return c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' ||
|
||||||
|
c == '\v';
|
||||||
|
}
|
||||||
|
|
||||||
|
int av_isxdigit(int c)
|
||||||
|
{
|
||||||
|
c = av_tolower(c);
|
||||||
|
return av_isdigit(c) || (c >= 'a' && c <= 'z');
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef TEST
|
#ifdef TEST
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
|
@ -188,26 +188,17 @@ char *av_strtok(char *s, const char *delim, char **saveptr);
|
|||||||
/**
|
/**
|
||||||
* Locale-independent conversion of ASCII isdigit.
|
* Locale-independent conversion of ASCII isdigit.
|
||||||
*/
|
*/
|
||||||
static inline int av_isdigit(int c)
|
int av_isdigit(int c);
|
||||||
{
|
|
||||||
return c >= '0' && c <= '9';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Locale-independent conversion of ASCII isgraph.
|
* Locale-independent conversion of ASCII isgraph.
|
||||||
*/
|
*/
|
||||||
static inline int av_isgraph(int c)
|
int av_isgraph(int c);
|
||||||
{
|
|
||||||
return c > 32 && c < 127;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Locale-independent conversion of ASCII isspace.
|
* Locale-independent conversion of ASCII isspace.
|
||||||
*/
|
*/
|
||||||
static inline int av_isspace(int c)
|
int av_isspace(int c);
|
||||||
{
|
|
||||||
return c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Locale-independent conversion of ASCII characters to uppercase.
|
* Locale-independent conversion of ASCII characters to uppercase.
|
||||||
@ -232,11 +223,7 @@ static inline int av_tolower(int c)
|
|||||||
/**
|
/**
|
||||||
* Locale-independent conversion of ASCII isxdigit.
|
* Locale-independent conversion of ASCII isxdigit.
|
||||||
*/
|
*/
|
||||||
static inline int av_isxdigit(int c)
|
int av_isxdigit(int c);
|
||||||
{
|
|
||||||
c = av_tolower(c);
|
|
||||||
return av_isdigit(c) || (c >= 'a' && c <= 'z');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Locale-independent case-insensitive compare.
|
* Locale-independent case-insensitive compare.
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define LIBAVUTIL_VERSION_MAJOR 52
|
#define LIBAVUTIL_VERSION_MAJOR 52
|
||||||
#define LIBAVUTIL_VERSION_MINOR 18
|
#define LIBAVUTIL_VERSION_MINOR 19
|
||||||
#define LIBAVUTIL_VERSION_MICRO 100
|
#define LIBAVUTIL_VERSION_MICRO 100
|
||||||
|
|
||||||
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
|
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
|
||||||
|
Loading…
Reference in New Issue
Block a user