History

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.

Andreas Rheinhardt committed 5 years ago

Commit 6ff2aba1 parent ec20b811 file · +1 −3Browse files

Unified · Split

libavformat/utils.c+1−3
@@ -4262,13 +4262,11 @@ static void free_stream(AVStream **pst) · 4261 unmodified lines
4262 av_freep(&st->side_data[i].data);4262 av_freep(&st->side_data[i].data);
4263 av_freep(&st->side_data);4263 av_freep(&st->side_data);
4264 4264
4265 if (st->internal->parser)
4266 av_parser_close(st->internal->parser);
4267
4268 if (st->attached_pic.data)4265 if (st->attached_pic.data)
4269 av_packet_unref(&st->attached_pic);4266 av_packet_unref(&st->attached_pic);
4270 4267
4271 if (st->internal) {4268 if (st->internal) {
4269 av_parser_close(st->internal->parser);
4272 avcodec_free_context(&st->internal->avctx);4270 avcodec_free_context(&st->internal->avctx);
4273 av_bsf_free(&st->internal->bsfc);4271 av_bsf_free(&st->internal->bsfc);
4274 av_freep(&st->internal->priv_pts);4272 av_freep(&st->internal->priv_pts);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t