diff options
author | Benoit Fouet <benoit.fouet@free.fr> | 2014-11-21 09:45:42 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-22 15:55:07 +0100 |
commit | 90c9b494052e6110f43f3db8cc8f6720550b397b (patch) | |
tree | 1e65c740242187dc793b0d49ac432cd2a27e1972 /ffplay.c | |
parent | 0b9a9e0e2ccdb5d0fa7956d805e3f5f02d9d9a53 (diff) | |
download | ffmpeg-90c9b494052e6110f43f3db8cc8f6720550b397b.tar.gz |
ffplay: fix mem leak when opening input or parsing options fail.
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffplay.c')
-rw-r--r-- | ffplay.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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) { |