[FFmpeg-cvslog] ffprobe: make Writers constant.

Clément Bœsch git at videolan.org
Wed Nov 16 19:36:56 CET 2011


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Wed Nov 16 19:35:23 2011 +0100| [9813af259afd1ce04818a478d3dde839237ef721] | committer: Clément Bœsch

ffprobe: make Writers constant.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9813af259afd1ce04818a478d3dde839237ef721
---

 ffprobe.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/ffprobe.c b/ffprobe.c
index e203c32..d1b26be 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -302,9 +302,9 @@ static inline void writer_show_tags(WriterContext *wctx, AVDictionary *dict)
 
 #define MAX_REGISTERED_WRITERS_NB 64
 
-static Writer *registered_writers[MAX_REGISTERED_WRITERS_NB + 1];
+static const Writer *registered_writers[MAX_REGISTERED_WRITERS_NB + 1];
 
-static int writer_register(Writer *writer)
+static int writer_register(const Writer *writer)
 {
     static int next_registered_writer_idx = 0;
 
@@ -315,7 +315,7 @@ static int writer_register(Writer *writer)
     return 0;
 }
 
-static Writer *writer_get_by_name(const char *name)
+static const Writer *writer_get_by_name(const char *name)
 {
     int i;
 
@@ -450,7 +450,7 @@ static void default_show_tags(WriterContext *wctx, AVDictionary *dict)
     }
 }
 
-static Writer default_writer = {
+static const Writer default_writer = {
     .name                  = "default",
     .print_footer          = default_print_footer,
     .print_chapter_header  = default_print_chapter_header,
@@ -674,7 +674,7 @@ static void compact_show_tags(WriterContext *wctx, AVDictionary *dict)
     }
 }
 
-static Writer compact_writer = {
+static const Writer compact_writer = {
     .name                 = "compact",
     .priv_size            = sizeof(CompactContext),
     .init                 = compact_init,
@@ -694,7 +694,7 @@ static av_cold int csv_init(WriterContext *wctx, const char *args, void *opaque)
     return compact_init(wctx, "item_sep=,:nokey=1:escape=csv", opaque);
 }
 
-static Writer csv_writer = {
+static const Writer csv_writer = {
     .name                 = "csv",
     .priv_size            = sizeof(CompactContext),
     .init                 = csv_init,
@@ -849,7 +849,7 @@ static void json_show_tags(WriterContext *wctx, AVDictionary *dict)
     printf("\n    }");
 }
 
-static Writer json_writer = {
+static const Writer json_writer = {
     .name         = "json",
     .priv_size    = sizeof(JSONContext),
 
@@ -1123,7 +1123,7 @@ static int probe_file(const char *filename)
 {
     AVFormatContext *fmt_ctx;
     int ret;
-    Writer *w;
+    const Writer *w;
     char *buf;
     char *w_name = NULL, *w_args = NULL;
     WriterContext *wctx;



More information about the ffmpeg-cvslog mailing list