avformat/hls: fix SEGV in previous commit
authorAman Gupta <aman@tmm1.net>
Sun, 24 Dec 2017 20:31:27 +0000 (12:31 -0800)
committerAman Gupta <aman@tmm1.net>
Sun, 24 Dec 2017 20:31:27 +0000 (12:31 -0800)
Signed-off-by: Aman Gupta <aman@tmm1.net>
libavformat/hls.c

index 3805ed6..f00e22d 100644 (file)
@@ -1487,7 +1487,8 @@ reload:
         return copy_size;
     }
 
-    ret = read_from_url(v, current_segment(v), buf, buf_size, READ_NORMAL);
+    seg = current_segment(v);
+    ret = read_from_url(v, seg, buf, buf_size, READ_NORMAL);
     if (ret > 0) {
         if (just_opened && v->is_id3_timestamped != 0) {
             /* Intercept ID3 tags here, elementary audio streams are required