Commit a4a98f15 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt Committed by Michael Niedermayer

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: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 6fbc7f09
......@@ -703,12 +703,8 @@ static int nut_write_header(AVFormatContext *s)
nut->chapter = av_calloc(s->nb_chapters, sizeof(*nut->chapter));
nut->time_base= av_calloc(s->nb_streams +
s->nb_chapters, sizeof(*nut->time_base));
if (!nut->stream || !nut->chapter || !nut->time_base) {
av_freep(&nut->stream);
av_freep(&nut->chapter);
av_freep(&nut->time_base);
if (!nut->stream || !nut->chapter || !nut->time_base)
return AVERROR(ENOMEM);
}
for (i = 0; i < s->nb_streams; i++) {
AVStream *st = s->streams[i];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment