From 90c9b494052e6110f43f3db8cc8f6720550b397b Mon Sep 17 00:00:00 2001 From: Benoit Fouet Date: Fri, 21 Nov 2014 09:45:42 +0100 Subject: ffplay: fix mem leak when opening input or parsing options fail. Reviewed-by: Marton Balint Signed-off-by: Michael Niedermayer --- ffplay.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ffplay.c') diff --git a/ffplay.c b/ffplay.c index f79161dd00..1914a6692f 100644 --- a/ffplay.c +++ b/ffplay.c @@ -3169,8 +3169,9 @@ static int read_thread(void *arg) stream_component_close(is, is->video_stream); if (is->subtitle_stream >= 0) stream_component_close(is, is->subtitle_stream); - if (is->ic) { - avformat_close_input(&is->ic); + if (ic) { + avformat_close_input(&ic); + is->ic = NULL; } if (ret != 0) { -- cgit v1.2.3