From 5e1ca926aa7668a84240f593c883f257ebd2decb Mon Sep 17 00:00:00 2001 From: cehoyos Date: Sat, 16 May 2009 10:26:41 +0000 Subject: [PATCH] Add missing frees to stream_close() and do_exit(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Patch by Martin Storsjö, martin martin st git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18853 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b --- ffplay.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ffplay.c b/ffplay.c index cc12b4a97..299f4a0c3 100644 --- a/ffplay.c +++ b/ffplay.c @@ -2188,6 +2188,7 @@ static void stream_close(VideoState *is) SDL_DestroyCond(is->pictq_cond); SDL_DestroyMutex(is->subpq_mutex); SDL_DestroyCond(is->subpq_cond); + av_free(is); } static void stream_cycle_channel(VideoState *is, int codec_type) @@ -2269,10 +2270,15 @@ static void step_to_next_frame(void) static void do_exit(void) { + int i; if (cur_stream) { stream_close(cur_stream); cur_stream = NULL; } + for (i = 0; i < CODEC_TYPE_NB; i++) + av_free(avcodec_opts[i]); + av_free(avformat_opts); + av_free(sws_opts); if (show_status) printf("\n"); SDL_Quit(); -- 2.39.2