[FFmpeg-cvslog] avio: fix handling of , in urls

Michael Niedermayer git at videolan.org
Sat Dec 24 00:07:20 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Dec 23 23:59:10 2011 +0100| [ad9e0ed170234bc6c5660f96752777965081163e] | committer: Michael Niedermayer

avio: fix handling of , in urls
Fixes Ticket805

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ad9e0ed170234bc6c5660f96752777965081163e
---

 libavformat/avio.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavformat/avio.c b/libavformat/avio.c
index efe1c26..67005e3 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -145,10 +145,11 @@ static int url_alloc_for_protocol (URLContext **puc, struct URLProtocol *up,
     if (up->priv_data_size) {
         uc->priv_data = av_mallocz(up->priv_data_size);
         if (up->priv_data_class) {
+            int proto_len= strlen(up->name);
             char *start = strchr(uc->filename, ',');
             *(const AVClass**)uc->priv_data = up->priv_data_class;
             av_opt_set_defaults(uc->priv_data);
-            if(start){
+            if(!strncmp(up->name, uc->filename, proto_len) && uc->filename + proto_len == start){
                 int ret= 0;
                 char *p= start;
                 char sep= *++p;



More information about the ffmpeg-cvslog mailing list