---
 libavformat/hls.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index c102e36f52..4ab565f8e0 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -1882,7 +1882,10 @@ static int 
update_streams_from_subdemuxer(AVFormatContext *s, struct playlist *p
             return AVERROR(ENOMEM);
 
         st->id = pls->index;
-        dynarray_add(&pls->main_streams, &pls->n_main_streams, st);
+        err = av_dynarray_add_nofree(&pls->main_streams, &pls->n_main_streams,
+                                     st);
+        if (err < 0)
+            return err;
 
         add_stream_to_programs(s, pls, st);
 
-- 
2.31.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to