summaryrefslogtreecommitdiff
path: root/libavformat/vapoursynth.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2020-03-21 18:31:06 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-07-08 14:09:15 +0200
commitc1141aa71a0381c2ec9667ee146e67fa690d04b4 (patch)
tree65ccc678863e2d6bc4b703eb7bfa5463a540342a /libavformat/vapoursynth.c
parent24e4127cb4e0ded3052907540b944b0df564a6ba (diff)
avformat/vapoursynth: Simplify cleanup after read_header failure
by setting the FF_FMT_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/vapoursynth.c')
-rw-r--r--libavformat/vapoursynth.c3
1 files changed, 1 insertions, 2 deletions
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,