mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avformat/utils: Fix NPD when allocating AVStreamInternal fails
Regression since b9c5fdf6027010d15ee90a43aa023e45a5189097; fixes Coverity ID #1484786. Also remove the check for st->internal->parser as av_parser_close(NULL) is a no-op. Reviewed-by: James Almer <jamrial@gmail.com> Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
ec20b81302
commit
6ff2aba088
@ -4262,13 +4262,11 @@ static void free_stream(AVStream **pst)
|
||||
av_freep(&st->side_data[i].data);
|
||||
av_freep(&st->side_data);
|
||||
|
||||
if (st->internal->parser)
|
||||
av_parser_close(st->internal->parser);
|
||||
|
||||
if (st->attached_pic.data)
|
||||
av_packet_unref(&st->attached_pic);
|
||||
|
||||
if (st->internal) {
|
||||
av_parser_close(st->internal->parser);
|
||||
avcodec_free_context(&st->internal->avctx);
|
||||
av_bsf_free(&st->internal->bsfc);
|
||||
av_freep(&st->internal->priv_pts);
|
||||
|
Loading…
Reference in New Issue
Block a user