[FFmpeg-devel] [PATCH 10/10] avformat/hls: check dynarray_add error when add stream
Zhao Zhili
quinkblack at foxmail.com
Tue Apr 12 11:15:22 EEST 2022
---
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
More information about the ffmpeg-devel
mailing list