1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

avformat/nutenc: Drop redundant frees

Should writing the header fail, the allocations already performed will
be freed during deinit so remove the frees in nut_write_header().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Andreas Rheinhardt
2020-03-14 17:32:17 +01:00
committed by Michael Niedermayer
parent 6fbc7f092e
commit a4a98f15b2

View File

@@ -703,12 +703,8 @@ static int nut_write_header(AVFormatContext *s)
nut->chapter = av_calloc(s->nb_chapters, sizeof(*nut->chapter)); nut->chapter = av_calloc(s->nb_chapters, sizeof(*nut->chapter));
nut->time_base= av_calloc(s->nb_streams + nut->time_base= av_calloc(s->nb_streams +
s->nb_chapters, sizeof(*nut->time_base)); s->nb_chapters, sizeof(*nut->time_base));
if (!nut->stream || !nut->chapter || !nut->time_base) { if (!nut->stream || !nut->chapter || !nut->time_base)
av_freep(&nut->stream);
av_freep(&nut->chapter);
av_freep(&nut->time_base);
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
}
for (i = 0; i < s->nb_streams; i++) { for (i = 0; i < s->nb_streams; i++) {
AVStream *st = s->streams[i]; AVStream *st = s->streams[i];