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>
This commit is contained in:
Andreas Rheinhardt 2020-03-21 18:31:06 +01:00
parent 24e4127cb4
commit c1141aa71a
1 changed files with 1 additions and 2 deletions

View File

@ -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,