From patchwork Wed Jul 20 14:49:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zane van Iperen X-Patchwork-Id: 36872 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp2452287pzb; Wed, 20 Jul 2022 07:50:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ukX+aLU80eMR7Gldv7w4KulYyPtJK2L9ph/YtcBGOUAmM6WJUgI5CABNLnN/0GBGAH9Lpp X-Received: by 2002:a05:6402:328f:b0:43a:8488:1000 with SMTP id f15-20020a056402328f00b0043a84881000mr51267298eda.105.1658328607372; Wed, 20 Jul 2022 07:50:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658328607; cv=none; d=google.com; s=arc-20160816; b=QttgoUiyGnPytdWsDiltJRsbf4cybqXgBdWy8EWGRzUGuNm6A63GssqiaKjU8sKr69 7VHAtZhKsyZ1mLQ0r4J6DrV22svGJQA4fcihJM1F5YRSvW1zzV9pAH2MB4HoZlV2PFNF Vjcn9ZxqQrFR6q2KZefPyNzN/7cEhhtf/AGQXyOXW6Dc5XWMB/6EQueQRQgnrnrFJ8SJ Rvkg/h9gZ31tN10x0AkzKm9g+t2cCMtSWc2pGzzFySjAAUCmAlXAnd1TUjBuplHS9zMI IYW9qvtC4yWJ7uLL5piwxRqstqDRNlAteuT736tgzdaWBbKX2aCfurXirSc3kqXHnrvY HEmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=ULsC7/OPy+CGE+HeRAl13XC/WSpQV3fMdQY2sXBSXso=; b=X2qhPbf5EO8Nbp/GfDKYg9n+VCe8SXpmu2nv8hhFmKuaFXnZyF20IS91eCVbUwVqjO 64GoAvdweyFGFsXT4UgGOHGr4InmOkFwozTkKOHdod86qXoBsRuImCo1zxlglKBBYAWz PuMbuQo5c/N7xqghbWh9fYofnAS9EJlJuHb/TOimKyyUSlSI9jIfBJuJO0lwHVy8pREa 1eAjSVgJZtvp/rK+1pAfQryHFr8xITQvF3iq63vzmgH+XXFeI6YYpnIIx7iapi2GTHZ4 u0Pp7hRxr1Hqna3b3IrbWHykhLtMwVjT+tbqb8I9k9j1LYx9TS/4KCtbYeuncmzKlMAq TiJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zanevaniperen.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id sc36-20020a1709078a2400b0072ef491cc0dsi22370092ejc.113.2022.07.20.07.50.06; Wed, 20 Jul 2022 07:50:07 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zanevaniperen.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CA03568B638; Wed, 20 Jul 2022 17:50:03 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4858068B5E6 for ; Wed, 20 Jul 2022 17:49:57 +0300 (EEST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Zane van Iperen To: ffmpeg-devel@ffmpeg.org Date: Thu, 21 Jul 2022 00:49:34 +1000 Message-Id: <20220720144937.93133-1-zane@zanevaniperen.com> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: cadance.vs49688.net Subject: [FFmpeg-devel] [PATCH v2 1/4] avformat/argo_cvg: name unk{1, 2} fields correctly X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: qb2t3pu38Yh2 Signed-off-by: Zane van Iperen --- libavformat/argo_cvg.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/libavformat/argo_cvg.c b/libavformat/argo_cvg.c index f32487023a..be78091f0c 100644 --- a/libavformat/argo_cvg.c +++ b/libavformat/argo_cvg.c @@ -40,9 +40,9 @@ #define ARGO_CVG_SAMPLES_PER_BLOCK 28 typedef struct ArgoCVGHeader { - uint32_t size; /*< File size -8 (this + trailing checksum) */ - uint32_t unk1; /*< Unknown. Always seems to be 0 or 1. */ - uint32_t unk2; /*< Unknown. Always seems to be 0 or 1. */ + uint32_t size; /*< File size -8 (this + trailing checksum) */ + uint32_t loop; /*< Loop flag. */ + uint32_t reverb; /*< Reverb flag. */ } ArgoCVGHeader; typedef struct ArgoCVGOverride { @@ -91,17 +91,17 @@ static int argo_cvg_probe(const AVProbeData *p) if (p->buf_size < ARGO_CVG_HEADER_SIZE) return 0; - cvg.size = AV_RL32(p->buf + 0); - cvg.unk1 = AV_RL32(p->buf + 4); - cvg.unk2 = AV_RL32(p->buf + 8); + cvg.size = AV_RL32(p->buf + 0); + cvg.loop = AV_RL32(p->buf + 4); + cvg.reverb = AV_RL32(p->buf + 8); if (cvg.size < 8) return 0; - if (cvg.unk1 != 0 && cvg.unk1 != 1) + if (cvg.loop != 0 && cvg.loop != 1) return 0; - if (cvg.unk2 != 0 && cvg.unk2 != 1) + if (cvg.reverb != 0 && cvg.reverb != 1) return 0; return AVPROBE_SCORE_MAX / 4 + 1; @@ -150,15 +150,14 @@ static int argo_cvg_read_header(AVFormatContext *s) else if (ret != ARGO_CVG_HEADER_SIZE) return AVERROR(EIO); - ctx->header.size = AV_RL32(buf + 0); - ctx->header.unk1 = AV_RL32(buf + 4); - ctx->header.unk2 = AV_RL32(buf + 8); + ctx->header.size = AV_RL32(buf + 0); + ctx->header.loop = AV_RL32(buf + 4); + ctx->header.reverb = AV_RL32(buf + 8); if (ctx->header.size < 8) return AVERROR_INVALIDDATA; av_log(s, AV_LOG_TRACE, "size = %u\n", ctx->header.size); - av_log(s, AV_LOG_TRACE, "unk = %u, %u\n", ctx->header.unk1, ctx->header.unk2); if ((ret = argo_cvg_read_checksum(s->pb, &ctx->header, &ctx->checksum)) < 0) return ret; @@ -172,10 +171,10 @@ static int argo_cvg_read_header(AVFormatContext *s) for (size_t i = 0; i < FF_ARRAY_ELEMS(overrides); i++) { const ArgoCVGOverride *ovr = overrides + i; - if (ovr->header.size != ctx->header.size || - ovr->header.unk1 != ctx->header.unk1 || - ovr->header.unk2 != ctx->header.unk2 || - ovr->checksum != ctx->checksum || + if (ovr->header.size != ctx->header.size || + ovr->header.loop != ctx->header.loop || + ovr->header.reverb != ctx->header.reverb || + ovr->checksum != ctx->checksum || av_strcasecmp(filename, ovr->name) != 0) continue; From patchwork Wed Jul 20 14:49:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zane van Iperen X-Patchwork-Id: 36875 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp2452527pzb; Wed, 20 Jul 2022 07:50:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tpbFaeNUfGQXy8OoswgsGLnTZl0wIrDaQE+b2o8//dq0KSJet73nmUN+SbIkmLulFXVkpj X-Received: by 2002:aa7:d64f:0:b0:43b:ba21:7e85 with SMTP id v15-20020aa7d64f000000b0043bba217e85mr2987027edr.59.1658328635210; Wed, 20 Jul 2022 07:50:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658328635; cv=none; d=google.com; s=arc-20160816; b=plhJgqWApU50BhscLo9EIfET2x8nh/q/OhUglFMy7ug0KNMuHbyjRaxFyGAxb2f4RE xdoOZ7CNV8YiT3MvBte9RDLGeo+/1RKWbzEUZ7kUjTosDR6ZGE1NtHvRGhZgYZawkcgk 9waz4UatJXb87HO/uxQjX7r1JslGDfVNZp98Ulv7Hwy7nLc19tAubKwwUu+N8ruwMxLv mtFhDW8PdeVDS1cENeTK9r2jROg5KCBjooS3WfJY2qz05etrTZZpfYN+dgmdv6FFrzcF lY3dZVecwUwcoAS2JhIGbXbl03cdYO/mn8wRwHPJcAhFhH+mH2T7XbEuJJXDWHZ5P/e4 9BMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=NWFiVs5aIXnDHw03ho/W8mENtz/bTXf5EwBt+gFEmyc=; b=SR45L0Udz4zqGQzbSFN5K0HNhCtC1demyxBpW4TDJhn72LQFjYIWI+blRNqZqHwSDY 6w/khhiRVk5VYKRYpyclIGOsUUiX+r/TKOWXQM/WMxyp6kSqRkwqP7mqB6Vf5U4mSPsD MN6EB+yLRtG0N3Tv8YBibjpqVecYefPQ/Ven/AF2J1Kv73qyGTCKy8kPT835FiTmmeLq 3jQUtKvqZj/F/xj4s/ddglD1bOTRirSDWwqRKgRJcftit7KaTPrEliCr6OiNQMkkGCRE cImNKCvXwjsjQ1veVEolmRYaKCu9ocFTIaebTK1T57INgCJkfsnFvcrG6N2QbKbR3g/2 vFow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zanevaniperen.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ht8-20020a170907608800b0072b4da1abe2si25311833ejc.791.2022.07.20.07.50.34; Wed, 20 Jul 2022 07:50:35 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zanevaniperen.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DF87B68B21C; Wed, 20 Jul 2022 17:50:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3C36C68B677 for ; Wed, 20 Jul 2022 17:50:11 +0300 (EEST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Zane van Iperen To: ffmpeg-devel@ffmpeg.org Date: Thu, 21 Jul 2022 00:49:35 +1000 Message-Id: <20220720144937.93133-2-zane@zanevaniperen.com> In-Reply-To: <20220720144937.93133-1-zane@zanevaniperen.com> References: <20220720144937.93133-1-zane@zanevaniperen.com> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: cadance.vs49688.net Subject: [FFmpeg-devel] [PATCH v2 2/4] avformat/argo_cvg: add -loop and -reverb options X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: uk+alfxCg1ZB Signed-off-by: Zane van Iperen --- 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 } }; From patchwork Wed Jul 20 14:49:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zane van Iperen X-Patchwork-Id: 36874 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp2452451pzb; Wed, 20 Jul 2022 07:50:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vcK+lKsN4tIraWkubnwc70lH8ygqRGRjTDKghqk+oUZhM5ZEOvHSG8jPSGVr0YYV5ejV8P X-Received: by 2002:a17:907:94d1:b0:72f:10c:bb3c with SMTP id dn17-20020a17090794d100b0072f010cbb3cmr24571351ejc.532.1658328626289; Wed, 20 Jul 2022 07:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658328626; cv=none; d=google.com; s=arc-20160816; b=X2X9OLs1iAnyO++8maAqBX3/l1NuEcAhj9s0TjoHgv+af+nwzSrHtuUWbC5pnEqifp RINlrfIGvjGfw148Ofq9TrudhvNzwNELztkvFNFX6LKGEReq+Q0OlFO5Ry1jJQtEsNXt LRMhOMxfuA5NmKuvMT/oHPjwl9os7hhPQo0gHr91TdcfiCVoWafdE4GzQzZe0lXbCO3N tWAHBOaZUvz/ijzXKdcJWfRphm7uVOEloGEBd6j4Df2/8SMYJqa5x7P3A4Oi+g+o+llI 39owS/Pj5XctIzqtsI7eVKT8U+DUAvKoqa0wx93DOWf1Gl9s2AR4AhM6NPV3Zvv3wWxj atEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=ynDbv+iHUwt6gyZvvWB5XNGSFeOW/++LKn501d2YTuM=; b=Y1QidxTXdhqG7ojKG1JbQbYGNJ9NZtAheVPlgZ6aNgLnSK/L+MfMLiju1XWltgtox2 P4Fjur0wz3EMxoKtzJzTWRGdQkD9f2GTzzEeZ+YNC9Is+LEQf3iOZYbrNlSfbum2mDM5 nyqFphY+NNjgPtte0Fm30q+iyBnvGsGoBWjeBNVd/hZqXfu1VSvNQcg2QHG/0ApsVerd /Dstli2k2umCDN0acdGc4G4Nz5rtoGxZHOnHZA3uFtZOTRmM06pufGTdAnIoTvKYVOns YGhBvvEML9Jl+SPO3juEEo7swskl3+1uo2XrQ0MsEk80BzYQ/6c1LbpE5Hb5Jl5jSxwB P4cQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zanevaniperen.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ht10-20020a170907608a00b0072f3efb96b3si10773346ejc.40.2022.07.20.07.50.25; Wed, 20 Jul 2022 07:50:26 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zanevaniperen.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0240C68B6B0; Wed, 20 Jul 2022 17:50:15 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3CF9D68B5FF for ; Wed, 20 Jul 2022 17:50:08 +0300 (EEST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Zane van Iperen To: ffmpeg-devel@ffmpeg.org Date: Thu, 21 Jul 2022 00:49:36 +1000 Message-Id: <20220720144937.93133-3-zane@zanevaniperen.com> In-Reply-To: <20220720144937.93133-1-zane@zanevaniperen.com> References: <20220720144937.93133-1-zane@zanevaniperen.com> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: cadance.vs49688.net Subject: [FFmpeg-devel] [PATCH v2 3/4] avformat/argo_cvg: remove trace logging X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: weYsg2Nd8PmB Signed-off-by: Zane van Iperen --- libavformat/argo_cvg.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libavformat/argo_cvg.c b/libavformat/argo_cvg.c index 32247a06be..12465dcbcc 100644 --- a/libavformat/argo_cvg.c +++ b/libavformat/argo_cvg.c @@ -159,13 +159,9 @@ static int argo_cvg_read_header(AVFormatContext *s) if (ctx->header.size < 8) return AVERROR_INVALIDDATA; - av_log(s, AV_LOG_TRACE, "size = %u\n", ctx->header.size); - if ((ret = argo_cvg_read_checksum(s->pb, &ctx->header, &ctx->checksum)) < 0) return ret; - av_log(s, AV_LOG_TRACE, "checksum = %u\n", ctx->checksum); - par = st->codecpar; par->codec_type = AVMEDIA_TYPE_AUDIO; par->codec_id = AV_CODEC_ID_ADPCM_PSX; From patchwork Wed Jul 20 14:49:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zane van Iperen X-Patchwork-Id: 36873 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp2452357pzb; Wed, 20 Jul 2022 07:50:16 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tWdtDvqCXl8F1lMslhIbSrbyuGZJF9kQcKPGzcDsGZBMDCM7f4WL1FcdFWh3/pPMBW7JQ7 X-Received: by 2002:a05:6402:2281:b0:43b:5d77:12d9 with SMTP id cw1-20020a056402228100b0043b5d7712d9mr23656590edb.295.1658328616709; Wed, 20 Jul 2022 07:50:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658328616; cv=none; d=google.com; s=arc-20160816; b=V7rsYVaPwCso6ZyevOHKfmm9yVZeNvbgNqGKdVhJgsZTtSoVZJ0e/d0h4wZEtodGqP IwUo9X/y3RNZuBx75TFFMsI/pQo74+kq93LWhLi5jj/HnycS6Ip8INtkNktO1saON7zf mA1GSdBXm4/JidbBHbeV+UADRXASUs8bzTl8oypCZxx54HFQdVpePyKgSZPItkF5zE32 rxuKYN+yrv8AF+pJU8sITtXKI4HlOOqQGkpGhesiZBUl+NkKwzxsYVIY9dG3R1Bqn8xN Cz/gWSUlJQ+XsaxIdDrnto+4LExkwIr7mttvpTsIb4TwLME7rkJm1ayZa/bLZn2dXaYf XC5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=TL5LGmErCRvEaLLBCc3FCUCGoJ5yGuiJmZg9GbMlRNE=; b=Da+0v8/9Q1r1WgwKWrjMkUPpZyt6heS5tRlo67omHcLo8lEPQvHpziwyAH+2KZlJWf GlLHkjhZAvG/oQEAEuvFJts3lGZu5Mg50sWQm0ZFv4UUXqW988ITKN85FEpwOG5FsrYN QgNrxcIl56/p8C3UAFrH6YHiU8dcMXkqJ0+Z72MLRUBHO4ghT9iEsmn/fWuQipHp0ZM8 EXBjYpo3JPpEsVO9tD+zOnogkgVfqkzlVeyaRsrltf0VfRDq3l0+gTqyRqHiPTXXzphe wL5xRFQg1ACL4lapcwvl9GMm1qZVy53J0jAPRFOaqCBwmPCBRd7YZV2klhr+oP+7RPGb QUKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zanevaniperen.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id s18-20020a170906501200b0070d00528830si19456381ejj.221.2022.07.20.07.50.16; Wed, 20 Jul 2022 07:50:16 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zanevaniperen.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E507568B671; Wed, 20 Jul 2022 17:50:08 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F231068B274 for ; Wed, 20 Jul 2022 17:50:02 +0300 (EEST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Zane van Iperen To: ffmpeg-devel@ffmpeg.org Date: Thu, 21 Jul 2022 00:49:37 +1000 Message-Id: <20220720144937.93133-4-zane@zanevaniperen.com> In-Reply-To: <20220720144937.93133-1-zane@zanevaniperen.com> References: <20220720144937.93133-1-zane@zanevaniperen.com> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: cadance.vs49688.net Subject: [FFmpeg-devel] [PATCH v2 4/4] avformat/argo_cvg: expose loop/reverb/checksum via metadata X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: yhMMbB+C7KOP Signed-off-by: Zane van Iperen --- libavformat/argo_cvg.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libavformat/argo_cvg.c b/libavformat/argo_cvg.c index 12465dcbcc..3d4abb4758 100644 --- a/libavformat/argo_cvg.c +++ b/libavformat/argo_cvg.c @@ -162,6 +162,15 @@ static int argo_cvg_read_header(AVFormatContext *s) if ((ret = argo_cvg_read_checksum(s->pb, &ctx->header, &ctx->checksum)) < 0) return ret; + if (av_dict_set_int(&st->metadata, "loop", ctx->header.loop, 0) < 0) + return AVERROR(ENOMEM); + + if (av_dict_set_int(&st->metadata, "reverb", ctx->header.reverb, 0) < 0) + return AVERROR(ENOMEM); + + if (av_dict_set_int(&st->metadata, "checksum", ctx->checksum, 0) < 0) + return AVERROR(ENOMEM); + par = st->codecpar; par->codec_type = AVMEDIA_TYPE_AUDIO; par->codec_id = AV_CODEC_ID_ADPCM_PSX;