From e5295c0dd9382070dc36ae464932d10bb8d032cf Mon Sep 17 00:00:00 2001 From: Ramiro Polla Date: Mon, 14 Apr 2008 22:31:49 +0000 Subject: [PATCH] Move av_exit() so it can be used by more functions without needing forward declaration. Originally committed as revision 12826 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffmpeg.c | 106 +++++++++++++++++++++++++++---------------------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/ffmpeg.c b/ffmpeg.c index affb9d201e..7a3d7073d4 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -371,6 +371,59 @@ static int decode_interrupt_cb(void) return q_pressed || (q_pressed = read_key() == 'q'); } +static int av_exit() +{ + int i; + + /* close files */ + for(i=0;ioformat->flags & AVFMT_NOFILE)) + url_fclose(s->pb); + for(j=0;jnb_streams;j++) { + av_free(s->streams[j]->codec); + av_free(s->streams[j]); + } + av_free(s); + } + for(i=0;ioformat->flags & AVFMT_NOFILE)) - url_fclose(s->pb); - for(j=0;jnb_streams;j++) { - av_free(s->streams[j]->codec); - av_free(s->streams[j]); - } - av_free(s); - } - for(i=0;i