[FFmpeg-devel] [PATCH] Ignore freeing opt_names, and make that and opt_values static in cmdutils.c

Diego Elio Pettenò flameeyes
Tue Jan 25 01:05:42 CET 2011


This is alternative approach one for the solution, the other would add a
similar free to opt_values.
---
 cmdutils.c |    4 ++--
 cmdutils.h |    1 -
 ffmpeg.c   |    1 -
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/cmdutils.c b/cmdutils.c
index 58fe85c..6727ba2 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -48,8 +48,8 @@
 #include <sys/resource.h>
 #endif
 
-const char **opt_names;
-const char **opt_values;
+static const char **opt_names;
+static const char **opt_values;
 static int opt_name_count;
 AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
 AVFormatContext *avformat_opts;
diff --git a/cmdutils.h b/cmdutils.h
index c3d8a42..2ec0dc0 100644
--- a/cmdutils.h
+++ b/cmdutils.h
@@ -37,7 +37,6 @@ extern const char program_name[];
  */
 extern const int program_birth_year;
 
-extern const char **opt_names;
 extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
 extern AVFormatContext *avformat_opts;
 extern struct SwsContext *sws_opts;
diff --git a/ffmpeg.c b/ffmpeg.c
index ffc1fab..11e759d 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -538,7 +538,6 @@ static int ffmpeg_exit(int ret)
         fclose(vstats_file);
     av_free(vstats_filename);
 
-    av_free(opt_names);
     av_free(streamid_map);
     av_free(input_codecs);
     av_free(output_codecs);
-- 
1.7.4.rc2




More information about the ffmpeg-devel mailing list