summaryrefslogtreecommitdiff
path: root/src/libffmpeg/libavcodec/opts.c
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2003-10-27 15:24:38 +0000
committerMike Melanson <mike@multimedia.cx>2003-10-27 15:24:38 +0000
commitc5b6afab8b74e5cc938b8467d3808a877ded7d03 (patch)
tree4a9738571b6330c8895c6ad3faec4d68f72fbb16 /src/libffmpeg/libavcodec/opts.c
parentd2a72f348508fd0a78a80f4da795dcf3155f02bc (diff)
downloadxine-lib-c5b6afab8b74e5cc938b8467d3808a877ded7d03.tar.gz
xine-lib-c5b6afab8b74e5cc938b8467d3808a877ded7d03.tar.bz2
super mega ffmpeg tree sync
CVS patchset: 5615 CVS date: 2003/10/27 15:24:38
Diffstat (limited to 'src/libffmpeg/libavcodec/opts.c')
-rw-r--r--src/libffmpeg/libavcodec/opts.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/libffmpeg/libavcodec/opts.c b/src/libffmpeg/libavcodec/opts.c
index 44a213397..2ce459d75 100644
--- a/src/libffmpeg/libavcodec/opts.c
+++ b/src/libffmpeg/libavcodec/opts.c
@@ -11,7 +11,6 @@
*/
#include "avcodec.h"
-#include "os_support.h"
const AVOption avoptions_common[] = {
AVOPTION_CODEC_FLAG("bit_exact", "use only bit-exact stuff", flags, CODEC_FLAG_BITEXACT, 0),
@@ -40,15 +39,32 @@ const AVOption avoptions_workaround_bug[] = {
AVOPTION_END()
};
+/* avoid compatibility problems by redefining it */
+static int av_strcasecmp(const char *s1, const char *s2)
+{
+ signed char val;
+
+ for(;;) {
+ val = toupper(*s1) - toupper(*s2);
+ if (val != 0)
+ break;
+ if (*s1 != '\0')
+ break;
+ s1++;
+ s2++;
+ }
+ return val;
+}
+
static int parse_bool(const AVOption *c, char *s, int *var)
{
int b = 1; /* by default -on- when present */
if (s) {
- if (!strcasecmp(s, "off") || !strcasecmp(s, "false")
+ if (!av_strcasecmp(s, "off") || !av_strcasecmp(s, "false")
|| !strcmp(s, "0"))
b = 0;
- else if (!strcasecmp(s, "on") || !strcasecmp(s, "true")
+ else if (!av_strcasecmp(s, "on") || !av_strcasecmp(s, "true")
|| !strcmp(s, "1"))
b = 1;
else