[FFmpeg-devel] [PATCH] match input format names split by commas
Michael Niedermayer
michaelni
Fri Jan 16 22:48:20 CET 2009
On Fri, Jan 16, 2009 at 12:31:22PM -0800, Baptiste Coudurier wrote:
> 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 ;)
i dont mind auto completion in unambigous cases but here
m -> mkv or was mp4 first ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090116/c35b4b89/attachment.pgp>
More information about the ffmpeg-devel
mailing list