Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Fouet <benoit.fouet@free.fr>2014-11-21 11:45:42 +0300
committerMichael Niedermayer <michaelni@gmx.at>2014-11-22 17:55:07 +0300
commit90c9b494052e6110f43f3db8cc8f6720550b397b (patch)
tree1e65c740242187dc793b0d49ac432cd2a27e1972 /ffplay.c
parent0b9a9e0e2ccdb5d0fa7956d805e3f5f02d9d9a53 (diff)
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.c5
1 files changed, 3 insertions, 2 deletions
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) {