Message ID | tencent_29CEA6254D3308085EB3E2537035CC691505@qq.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,01/10] avformat/hls: fix repeated requests for media init section | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavformat/hls.c b/libavformat/hls.c index 67c9650e0b..e249810bce 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -463,7 +463,13 @@ static struct segment *get_init_section(struct playlist *pls, av_free(sec_ptr); return NULL; } - dynarray_add(&pls->init_sections, &pls->n_init_sections, sec_ptr); + if (av_dynarray_add_nofree(&pls->init_sections, + &pls->n_init_sections, + sec_ptr) < 0) { + av_free(sec_ptr->url); + av_free(sec_ptr); + return NULL; + } return sec_ptr; }