]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/avio.c
mpegts: remove unused variable
[ffmpeg] / libavformat / avio.c
index efe1c26683f97719c37d88875026fc1f7a7520b9..67005e3ecaaf234f993f32435c3c9c8dacfc1d12 100644 (file)
@@ -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;