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