Regression since b9c5fdf6027010d15ee90a43aa023e45a5189097; fixes Coverity ID #1484786. Also remove the check for st->internal->parser as av_parser_close(NULL) is a no-op.
Unified · Split
| @@ -4262,13 +4262,11 @@ static void free_stream(AVStream **pst) · 4261 unmodified lines | ||
| 4262 | 4262 | av_freep(&st->side_data[i].data); |
| 4263 | 4263 | av_freep(&st->side_data); |
| 4264 | 4264 | |
| 4265 | − if (st->internal->parser) | |
| 4266 | − av_parser_close(st->internal->parser); | |
| 4267 | − | |
| 4268 | 4265 | if (st->attached_pic.data) |
| 4269 | 4266 | av_packet_unref(&st->attached_pic); |
| 4270 | 4267 | |
| 4271 | 4268 | if (st->internal) { |
| 4269 | + av_parser_close(st->internal->parser); | |
| 4272 | 4270 | avcodec_free_context(&st->internal->avctx); |
| 4273 | 4271 | av_bsf_free(&st->internal->bsfc); |
| 4274 | 4272 | av_freep(&st->internal->priv_pts); |