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;