From patchwork Wed Jun 23 00:41:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 28603 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2042:0:0:0:0 with SMTP id z2csp3497317iod; Tue, 22 Jun 2021 17:43:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmYjMG9ifx7g9OZT/HwCDuznTa828x9vTbol1R4jp1d7Ixp0eDk76M7c8lniGF5vcdeAC5 X-Received: by 2002:a17:906:74a:: with SMTP id z10mr6837944ejb.107.1624409010773; Tue, 22 Jun 2021 17:43:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624409010; cv=none; d=google.com; s=arc-20160816; b=GVgbWVVKzudgcIa0zKJtYLES126rG2dLswVbIslLRYREaXuxMaGskj9SsIrxT2gTM1 CgLDRqrhoVTI0ZJuCPnm/GmkA4pl+nl8aO0wPqstf/nhlWX1NhefIvg90x2ztX3AqMWn P4ebmMSgdjwoxNlanJOoBKz/G0GSBHftdxZbokPEjJde3o3clD7RFosKN+gfeMVnr5la bgtLuTZibwK+muQo3592tJ3mDYp45zUKShGKa4RDnSTs+Q8g/UMOKkwngS29ksy16L9y mTcypETrHQKc0ga664EMrWwj/+Ji0ERmuztR2PIfBl7mtBNDGOWwx0Lz8++8y5QyfdqI hKHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc: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=wdAmlLbqVKWpnLS9GxMAbmKBJ/mxZy3d44tZ/sGrGN0=; b=wIVDw6vhLzv0paC6VJg7fpnVplyBiFfi2aCIPjopOET77NZkjtkI5wN1m+8k6Vct7a BcZWSHPUBfc6RBMQ7DiNMqzMdYm2mx/sMEK8JCtxDevshfvfNleZk8VQ/j7IMmGnsUBY 3mM8aqnCGkeGrqlbkEMtCIAWllNKDm1LWQxJOr0zCIVHcBwPOzldSXH/yGXiq2Ct44Bk axl5w2oZwfT2ZFub88Jdkeo3w2XU0g+TPhjr8H8dtxtMJbtE8yaI0sLvZ9+oSswnCObN 8hPwuXRFfc3B4PuUt++NtuXDA+wTUCORttnYBu6NBk43NllJhPW6N8xn65lZBtDPtWPW 0inQ== 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id di18si21058834edb.218.2021.06.22.17.43.29; Tue, 22 Jun 2021 17:43:30 -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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 49CD468A0E7; Wed, 23 Jun 2021 03:43:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 34E0D680113 for ; Wed, 23 Jun 2021 03:43:19 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id C79F7E5842; Wed, 23 Jun 2021 02:43:18 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id twfvytueQ5kT; Wed, 23 Jun 2021 02:43:16 +0200 (CEST) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 75D79E4899; Wed, 23 Jun 2021 02:43:16 +0200 (CEST) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Wed, 23 Jun 2021 02:41:59 +0200 Message-Id: <20210623004159.27110-1-cus@passwd.hu> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avfilter/f_metadata: do not return the frame early if there is no 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 Cc: Marton Balint Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Wo3r1juX10w7 The early return caused isses for the "add" mode (got fixed in c95dfe5cce98cde3e7fb14fbd04b3897f3927cec) and the "select" mode needs a similar fix. It is probably better to fully remove the check, since all modes work correctly with NULL metadata. Signed-off-by: Marton Balint --- libavfilter/f_metadata.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c index e7c7b00118..d0a78b00d0 100644 --- a/libavfilter/f_metadata.c +++ b/libavfilter/f_metadata.c @@ -308,9 +308,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) AVDictionary **metadata = &frame->metadata; AVDictionaryEntry *e; - if (!*metadata && s->mode != METADATA_ADD) - return ff_filter_frame(outlink, frame); - e = av_dict_get(*metadata, !s->key ? "" : s->key, NULL, !s->key ? AV_DICT_IGNORE_SUFFIX: 0);