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

Andreas Rheinhardt git at videolan.org
Fri Dec 3 12:12:19 EET 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Dec  2 16:00:16 2021 +0100| [05c924a86db04e05831876dd2720093dcc2dc8e1] | committer: Andreas Rheinhardt

avdevice/lavfi: Cleanup generically on read_header failure

Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=05c924a86db04e05831876dd2720093dcc2dc8e1
---

 libavdevice/lavfi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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,
 };



More information about the ffmpeg-cvslog mailing list