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>
pull/375/head
Andreas Rheinhardt 3 years ago
parent 77a37e0369
commit 05c924a86d
  1. 3
      libavdevice/lavfi.c

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

Loading…
Cancel
Save