[FFmpeg-cvslog] avformat/argo_cvg: add -loop and -reverb options

Zane van Iperen git at videolan.org
Sun Jul 24 12:27:10 EEST 2022


ffmpeg | branch: master | Zane van Iperen <zane at zanevaniperen.com> | Sun Jul 17 23:27:31 2022 +1000| [23f0c55ff86c65b15bdfa14884f3201334e043c4] | committer: Zane van Iperen

avformat/argo_cvg: add -loop and -reverb options

Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
Signed-off-by: Zane van Iperen <zane at zanevaniperen.com>

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

 libavformat/argo_cvg.c | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/libavformat/argo_cvg.c b/libavformat/argo_cvg.c
index be78091f0c..32247a06be 100644
--- a/libavformat/argo_cvg.c
+++ b/libavformat/argo_cvg.c
@@ -62,6 +62,8 @@ typedef struct ArgoCVGDemuxContext {
 typedef struct ArgoCVGMuxContext {
     const AVClass *class;
     int           skip_rate_check;
+    int           loop;
+    int           reverb;
     uint32_t      checksum;
     size_t        size;
 } ArgoCVGMuxContext;
@@ -301,10 +303,10 @@ static int argo_cvg_write_header(AVFormatContext *s)
     ArgoCVGMuxContext *ctx = s->priv_data;
 
     avio_wl32(s->pb, 0); /* Size, fixed later. */
-    avio_wl32(s->pb, 0);
-    avio_wl32(s->pb, 1);
+    avio_wl32(s->pb, !!ctx->loop);
+    avio_wl32(s->pb, !!ctx->reverb);
 
-    ctx->checksum = 1;
+    ctx->checksum = !!ctx->loop + !!ctx->reverb;
     ctx->size     = 8;
     return 0;
 }
@@ -363,6 +365,26 @@ static const AVOption argo_cvg_options[] = {
         .max         = 1,
         .flags       = AV_OPT_FLAG_ENCODING_PARAM
     },
+    {
+        .name        = "loop",
+        .help        = "set loop flag",
+        .offset      = offsetof(ArgoCVGMuxContext, loop),
+        .type        = AV_OPT_TYPE_BOOL,
+        .default_val = {.i64 = 0},
+        .min         = 0,
+        .max         = 1,
+        .flags       = AV_OPT_FLAG_ENCODING_PARAM
+    },
+        {
+        .name        = "reverb",
+        .help        = "set reverb flag",
+        .offset      = offsetof(ArgoCVGMuxContext, reverb),
+        .type        = AV_OPT_TYPE_BOOL,
+        .default_val = {.i64 = 1},
+        .min         = 0,
+        .max         = 1,
+        .flags       = AV_OPT_FLAG_ENCODING_PARAM
+    },
     { NULL }
 };
 



More information about the ffmpeg-cvslog mailing list