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
42624262 av_freep(&st->side_data[i].data);
42634263 av_freep(&st->side_data);
42644264
4265− if (st->internal->parser)
4266− av_parser_close(st->internal->parser);
4267−
42684265 if (st->attached_pic.data)
42694266 av_packet_unref(&st->attached_pic);
42704267
42714268 if (st->internal) {
4269+ av_parser_close(st->internal->parser);
42724270 avcodec_free_context(&st->internal->avctx);
42734271 av_bsf_free(&st->internal->bsfc);
42744272 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