[FFmpeg-devel] [PATCH] match input format names split by commas

Baptiste Coudurier baptiste.coudurier
Fri Jan 16 21:31:22 CET 2009


Hi Michael,

Michael Niedermayer wrote:
> On Thu, Jan 15, 2009 at 03:38:29PM -0800, Baptiste Coudurier wrote:
>> Hi,
>>
>> $subject, this enables using "mov", "mp4, "mj2" etc..
> [...]
>> Index: libavformat/utils.c
>> ===================================================================
>> --- libavformat/utils.c	(revision 16617)
>> +++ libavformat/utils.c	(working copy)
>> @@ -153,6 +153,20 @@
>>      return 0;
>>  }
>>  
>> +static int match_format(const char *name, const char *names)
>> +{
>> +    if (!name || !names)
>> +        return 0;
>> +    for (;;) {
>> +        if (!strncasecmp(name, names, strlen(name)))
>> +            return 1;
>> +        if (!(names = strchr(names, ',')))
>> +            break;
>> +        names++;
>> +    }
>> +    return 0;
>> +}
> 
> with this m will match mp4

Hehe, auto completion ;)
New patch attached.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no
FFmpeg maintainer                                  http://www.ffmpeg.org
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: match_format2.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090116/f4080488/attachment.txt>



More information about the ffmpeg-devel mailing list