avformat/hls: fix memory leak with non-http segments
authorAman Gupta <aman@tmm1.net>
Sun, 24 Dec 2017 19:59:32 +0000 (11:59 -0800)
committerAman Gupta <aman@tmm1.net>
Sun, 24 Dec 2017 19:59:32 +0000 (11:59 -0800)
Signed-off-by: Aman Gupta <aman@tmm1.net>
libavformat/hls.c

index 5dadcfc..3805ed6 100644 (file)
@@ -1497,7 +1497,7 @@ reload:
 
         return ret;
     }
-    if (c->http_persistent) {
+    if (c->http_persistent && av_strstart(seg->url, "http", NULL)) {
         v->input_read_done = 1;
     } else {
         ff_format_io_close(v->parent, &v->input);