[FFmpeg-devel] [PATCH] lavf/avio: check for : in filenames for protocols.
Michael Niedermayer
michaelni at gmx.at
Wed Feb 27 21:58:11 CET 2013
On Wed, Feb 27, 2013 at 07:23:12PM +0100, Nicolas George wrote:
> If the first "special" character in a filename is a comma,
> it can introduce protocol options, but only if there is a
> colon at the end. Otherwise, it is just a filename with a
> comma.
>
> Fix trac ticket #2303.
>
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
> libavformat/avio.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/libavformat/avio.c b/libavformat/avio.c
> index b00cc9d..f6af0cb 100644
> --- a/libavformat/avio.c
> +++ b/libavformat/avio.c
> @@ -220,7 +220,9 @@ int ffurl_alloc(URLContext **puc, const char *filename, int flags,
> "Missing call to av_register_all()?\n");
> }
>
> - if (filename[proto_len] != ':' && filename[proto_len] != ',' || is_dos_path(filename))
> + if (filename[proto_len] != ':' &&
> + (filename[proto_len] != ',' || !strchr(filename + proto_len + 1, ':')) ||
i suggest (seems clearer to me)
!(filename[proto_len] == ',' && strchr(filename + proto_len + 1, ':'))
either way patch should be ok
[..]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The real ebay dictionary, page 3
"Rare item" - "Common item with rare defect or maybe just a lie"
"Professional" - "'Toy' made in china, not functional except as doorstop"
"Experts will know" - "The seller hopes you are not an expert"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130227/440fa3c1/attachment.asc>
More information about the ffmpeg-devel
mailing list