avdevice/lavfi: Cleanup generically on read_header failure

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-12-02 16:00:16 +01:00
parent 77a37e0369
commit 05c924a86d
1 changed files with 1 additions and 2 deletions

View File

@ -356,8 +356,6 @@ end:
av_free(pix_fmts);
avfilter_inout_free(&input_links);
avfilter_inout_free(&output_links);
if (ret < 0)
lavfi_read_close(avctx);
return ret;
}
@ -507,4 +505,5 @@ const AVInputFormat ff_lavfi_demuxer = {
.read_close = lavfi_read_close,
.flags = AVFMT_NOFILE,
.priv_class = &lavfi_class,
.flags_internal = FF_FMT_INIT_CLEANUP,
};