[FFmpeg-cvslog] r18485 - trunk/ffmpeg.c

bcoudurier subversion
Mon Apr 13 05:47:12 CEST 2009


Author: bcoudurier
Date: Mon Apr 13 05:47:12 2009
New Revision: 18485

Log:
move freeing code before exiting because of signal

Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	Mon Apr 13 05:43:29 2009	(r18484)
+++ trunk/ffmpeg.c	Mon Apr 13 05:47:12 2009	(r18485)
@@ -427,6 +427,11 @@ static int av_exit(int ret)
     powerpc_display_perf_report();
 #endif /* CONFIG_POWERPC_PERF */
 
+    for (i=0;i<CODEC_TYPE_NB;i++)
+        av_free(avcodec_opts[i]);
+    av_free(avformat_opts);
+    av_free(sws_opts);
+
     if (received_sigterm) {
         fprintf(stderr,
             "Received signal %d: terminating.\n",
@@ -434,11 +439,6 @@ static int av_exit(int ret)
         exit (255);
     }
 
-    for (i=0;i<CODEC_TYPE_NB;i++)
-        av_free(avcodec_opts[i]);
-    av_free(avformat_opts);
-    av_free(sws_opts);
-
     exit(ret); /* not all OS-es handle main() return value */
     return ret;
 }



More information about the ffmpeg-cvslog mailing list