]> git.sesse.net Git - ffmpeg/commitdiff
lavf/segment: decide whether to rename based on list URI
authorRodger Combs <rodger.combs@gmail.com>
Thu, 6 Oct 2016 07:00:25 +0000 (02:00 -0500)
committerRodger Combs <rodger.combs@gmail.com>
Fri, 21 Oct 2016 06:43:59 +0000 (01:43 -0500)
This fixes the case of writing segments to local files, but the list
over a network protocol.

libavformat/segment.c

index 33a5cf0c9faeefdf2ee9af8c773f4afa02897b10..55dcaf0b9ea957ecb7a88550de64d2565564a4d7 100644 (file)
@@ -709,7 +709,7 @@ static int seg_init(AVFormatContext *s)
             if ((ret = segment_list_open(s)) < 0)
                 goto fail;
         } else {
-            const char *proto = avio_find_protocol_name(s->filename);
+            const char *proto = avio_find_protocol_name(seg->list);
             seg->use_rename = proto && !strcmp(proto, "file");
         }
     }