1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

tools/uncoded_frame: fix double free

in case av_interleaved_write_uncoded_frame fails it seems
frame is freed for the second time in fail section.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>

This commit also removes 1 trailing whitespace as otherwise the push hook rejects it

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Lukasz Marek 2014-02-12 21:16:16 +01:00 committed by Michael Niedermayer
parent e03c1af55e
commit 9c3478c234

View File

@ -245,12 +245,12 @@ int main(int argc, char **argv)
ret = av_interleaved_write_uncoded_frame(st->mux, ret = av_interleaved_write_uncoded_frame(st->mux,
st->stream->index, st->stream->index,
frame); frame);
frame = NULL;
if (ret < 0) { if (ret < 0) {
av_log(st->stream->codec, AV_LOG_ERROR, av_log(st->stream->codec, AV_LOG_ERROR,
"Error writing frame: %s\n", av_err2str(ret)); "Error writing frame: %s\n", av_err2str(ret));
goto fail; goto fail;
} }
frame = NULL;
} }
} }
} }