---
libavformat/hls.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 65937120d5..b9e2e8a04d 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -1024,7 +1024,12 @@ static int parse_playlist(HLSContext *c, const char *url,
}
seg->duration = duration;
seg->key_type = key_type;
- dynarray_add(&pls->segments, &pls->n_segments, seg);
+ if (av_dynarray_add_nofree(&pls->segments, &pls->n_segments,
+ seg) < 0) {
+ free_segment(seg);
+ ret = AVERROR(ENOMEM);
+ goto fail;
+ }
is_segment = 0;
seg->size = seg_size;
--
2.31.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".