diff mbox series

[FFmpeg-devel] avdevice/lavfi: Cleanup generically on read_header failure

Message ID AM7PR03MB66606BD1C793B998685D08548F699@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 05c924a86db04e05831876dd2720093dcc2dc8e1
Headers show
Series [FFmpeg-devel] avdevice/lavfi: Cleanup generically on read_header failure
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Dec. 2, 2021, 3:05 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavdevice/lavfi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Paul B Mahol Dec. 2, 2021, 8:16 p.m. UTC | #1
probably ok
diff mbox series

Patch

diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index 4eb1f56f7d..826dafbd00 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -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,
 };