OSDN Git Service

lavf: make output format matching case insensitive
authorMans Rullgard <mans@mansr.com>
Sat, 19 May 2012 17:44:16 +0000 (18:44 +0100)
committerMans Rullgard <mans@mansr.com>
Sat, 19 May 2012 18:44:15 +0000 (19:44 +0100)
This is consistent with how input formats are matched.

Signed-off-by: Mans Rullgard <mans@mansr.com>
libavformat/utils.c

index e518847..e8430b2 100644 (file)
@@ -218,7 +218,7 @@ AVOutputFormat *av_guess_format(const char *short_name, const char *filename,
     score_max = 0;
     while ((fmt = av_oformat_next(fmt))) {
         score = 0;
-        if (fmt->name && short_name && !strcmp(fmt->name, short_name))
+        if (fmt->name && short_name && !av_strcasecmp(fmt->name, short_name))
             score += 100;
         if (fmt->mime_type && mime_type && !strcmp(fmt->mime_type, mime_type))
             score += 10;