summaryrefslogtreecommitdiff
path: root/libavformat/hlsproto.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/hlsproto.c')
-rw-r--r--libavformat/hlsproto.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/hlsproto.c b/libavformat/hlsproto.c
index 751fef2e4d..0eba049797 100644
--- a/libavformat/hlsproto.c
+++ b/libavformat/hlsproto.c
@@ -121,8 +121,10 @@ static int parse_playlist(URLContext *h, const char *url)
return ret;
read_chomp_line(in, line, sizeof(line));
- if (strcmp(line, "#EXTM3U"))
- return AVERROR_INVALIDDATA;
+ if (strcmp(line, "#EXTM3U")) {
+ ret = AVERROR_INVALIDDATA;
+ goto fail;
+ }
free_segment_list(s);
s->finished = 0;