[FFmpeg-cvslog] ffprobe: drop pointless opaque parameter in writer init callback

Stefano Sabatini git at videolan.org
Tue Sep 25 11:04:51 CEST 2012


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Mon Sep 24 16:42:09 2012 +0200| [2089f933003b951b96b95e976bd34bbeffbd29f3] | committer: Stefano Sabatini

ffprobe: drop pointless opaque parameter in writer init callback

The parameter was never used.

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

 ffprobe.c |   19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/ffprobe.c b/ffprobe.c
index e4941d5..6830f7d 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -160,7 +160,7 @@ typedef struct Writer {
     int priv_size;                  ///< private size for the writer context
     const char *name;
 
-    int  (*init)  (WriterContext *wctx, const char *args, void *opaque);
+    int  (*init)  (WriterContext *wctx, const char *args);
     void (*uninit)(WriterContext *wctx);
 
     void (*print_header)(WriterContext *ctx);
@@ -220,8 +220,7 @@ static void writer_close(WriterContext **wctx)
     av_freep(wctx);
 }
 
-static int writer_open(WriterContext **wctx, const Writer *writer,
-                       const char *args, void *opaque)
+static int writer_open(WriterContext **wctx, const Writer *writer, const char *args)
 {
     int ret = 0;
 
@@ -248,7 +247,7 @@ static int writer_open(WriterContext **wctx, const Writer *writer,
             goto fail;
     }
     if ((*wctx)->writer->init)
-        ret = (*wctx)->writer->init(*wctx, args, opaque);
+        ret = (*wctx)->writer->init(*wctx, args);
     if (ret < 0)
         goto fail;
 
@@ -612,7 +611,7 @@ static const AVOption compact_options[]= {
 
 DEFINE_WRITER_CLASS(compact);
 
-static av_cold int compact_init(WriterContext *wctx, const char *args, void *opaque)
+static av_cold int compact_init(WriterContext *wctx, const char *args)
 {
     CompactContext *compact = wctx->priv;
 
@@ -757,7 +756,7 @@ static const AVOption flat_options[]= {
 
 DEFINE_WRITER_CLASS(flat);
 
-static av_cold int flat_init(WriterContext *wctx, const char *args, void *opaque)
+static av_cold int flat_init(WriterContext *wctx, const char *args)
 {
     FlatContext *flat = wctx->priv;
 
@@ -896,7 +895,7 @@ static const AVOption ini_options[] = {
 
 DEFINE_WRITER_CLASS(ini);
 
-static av_cold int ini_init(WriterContext *wctx, const char *args, void *opaque)
+static av_cold int ini_init(WriterContext *wctx, const char *args)
 {
     INIContext *ini = wctx->priv;
 
@@ -1040,7 +1039,7 @@ static const AVOption json_options[]= {
 
 DEFINE_WRITER_CLASS(json);
 
-static av_cold int json_init(WriterContext *wctx, const char *args, void *opaque)
+static av_cold int json_init(WriterContext *wctx, const char *args)
 {
     JSONContext *json = wctx->priv;
 
@@ -1247,7 +1246,7 @@ static const AVOption xml_options[] = {
 
 DEFINE_WRITER_CLASS(xml);
 
-static av_cold int xml_init(WriterContext *wctx, const char *args, void *opaque)
+static av_cold int xml_init(WriterContext *wctx, const char *args)
 {
     XMLContext *xml = wctx->priv;
 
@@ -2112,7 +2111,7 @@ int main(int argc, char **argv)
         goto end;
     }
 
-    if ((ret = writer_open(&wctx, w, w_args, NULL)) >= 0) {
+    if ((ret = writer_open(&wctx, w, w_args)) >= 0) {
         writer_print_header(wctx);
 
         if (do_show_program_version)



More information about the ffmpeg-cvslog mailing list