diff mbox series

[FFmpeg-devel,49/54] avformat/vapoursynth: Simplify cleanup after read_header failure

Message ID HE1PR0301MB21549FEC10DCCE219A3FCA8C8F309@HE1PR0301MB2154.eurprd03.prod.outlook.com
State Accepted
Commit c1141aa71a0381c2ec9667ee146e67fa690d04b4
Headers show
Series [FFmpeg-devel,01/54] avformat: Add internal flags for AV(In|Out)putFormat
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt June 15, 2021, 11:32 p.m. UTC
by setting the FF_FMT_INIT_CLEANUP flag.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/vapoursynth.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/vapoursynth.c b/libavformat/vapoursynth.c
index 4ec4e77b59..1578a6ac77 100644
--- a/libavformat/vapoursynth.c
+++ b/libavformat/vapoursynth.c
@@ -294,8 +294,6 @@  static av_cold int read_header_vs(AVFormatContext *s)
 
 done:
     av_free(buf);
-    if (err < 0)
-        read_close_vs(s);
     return err;
 }
 
@@ -487,6 +485,7 @@  const AVInputFormat ff_vapoursynth_demuxer = {
     .name           = "vapoursynth",
     .long_name      = NULL_IF_CONFIG_SMALL("VapourSynth demuxer"),
     .priv_data_size = sizeof(VSContext),
+    .flags_internal = FF_FMT_INIT_CLEANUP,
     .read_probe     = probe_vs,
     .read_header    = read_header_vs,
     .read_packet    = read_packet_vs,