[FFmpeg-cvslog] ffplay: fix mem leak when opening input or parsing options fail.
Benoit Fouet
git at videolan.org
Sat Nov 22 15:55:54 CET 2014
ffmpeg | branch: master | Benoit Fouet <benoit.fouet at free.fr> | Fri Nov 21 09:45:42 2014 +0100| [90c9b494052e6110f43f3db8cc8f6720550b397b] | committer: Michael Niedermayer
ffplay: fix mem leak when opening input or parsing options fail.
Reviewed-by: Marton Balint <cus at passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=90c9b494052e6110f43f3db8cc8f6720550b397b
---
ffplay.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ffplay.c b/ffplay.c
index f79161d..1914a66 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) {
More information about the ffmpeg-cvslog
mailing list