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 33a5cf0..55dcaf0 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");
         }
     }