[FFmpeg-devel] [PATCH] tools/uncoded_frame: fix double free
Lukasz Marek
lukasz.m.luki at gmail.com
Wed Feb 12 21:16:16 CET 2014
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 at gmail.com>
---
tools/uncoded_frame.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/uncoded_frame.c b/tools/uncoded_frame.c
index da04d06..579fc50 100644
--- a/tools/uncoded_frame.c
+++ b/tools/uncoded_frame.c
@@ -245,12 +245,12 @@ int main(int argc, char **argv)
ret = av_interleaved_write_uncoded_frame(st->mux,
st->stream->index,
frame);
+ frame = NULL;
if (ret < 0) {
av_log(st->stream->codec, AV_LOG_ERROR,
"Error writing frame: %s\n", av_err2str(ret));
goto fail;
}
- frame = NULL;
}
}
}
--
1.8.3.2
More information about the ffmpeg-devel
mailing list