From patchwork Fri May 12 20:49:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul B Mahol X-Patchwork-Id: 41599 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:dca6:b0:f3:34fa:f187 with SMTP id ky38csp5689407pzb; Fri, 12 May 2023 13:49:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4lKidYzNg6pqPuuNe8eIlajFXRHl0N3vlXg1a1aKlIxZTVri/YlPLDJHvScoSugSOyJkKS X-Received: by 2002:a17:907:804:b0:960:176e:5cc1 with SMTP id wv4-20020a170907080400b00960176e5cc1mr23973627ejb.44.1683924592542; Fri, 12 May 2023 13:49:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683924592; cv=none; d=google.com; s=arc-20160816; b=wHg1T5sH18RmC37t3GD3jNF67PuyrZVtYEflgvJdA/DR4RXERZm+NM20XnGUyqgOw4 CXqNpvZZLBeoRB/PB9fq5F8lk4uIIGtGgun+VJE7yxnitNWteQQfYGrtJ0IbLrZRlLeh KoQeXDFBH858EbvnOQcNJehs2Ka/70AvmYNGP+6Oojh7pQltAuU68QKLqSNJlVIX5oGY nzsB/sTZfmylhrGKNSl9zaWPRdmWiHWrTxwp+rQPwECD0Ge+Fl5MQpelP3CCbDxeN05+ dRd7Pu/RAj8+h8ORuAHP0FlWfcjGLipj5j5BIcxAqv5EKs1fDouWlAv0lsE9Z96MUdyw HAAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :message-id:date:from:mime-version:dkim-signature:delivered-to; bh=ZauGzx7QXsBHyAnKmyyhOFcpJJJ+ZFbnvAbKet7rnmc=; b=qllKLqJLm3hyXkNc/BDcJgc4WG4IHl/NArBHCVZSSiyE9Zqq2HEwAGt51KDy8d5zvF MbmcM1sFcq75WhNrm5LBUlIKLg6UdY6/eB4tsQH9LdgiKj4pn+xKcS3Ul639ex5ovh26 drYyvqoUccwtEAX5Br6/2dxD5QKggWqWTBcJji943MZq75Zidm4iHts6DDxr/yrxufqb FjhtYXelbzU7HseounJH4rNCv1f7yyP8iGPty5cYB23wHaGHmzw/pipKA0eOCmeC9a66 NaUzSqdCwt2VwmYnzfApL04Q5ZdsEh1fzxWCVygASWlJhYxjURzmsI5hdWBFWKjivxSU 1TAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20221208 header.b=VhkRQ5uS; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id xa3-20020a170907b9c300b009537be42c08si9439679ejc.798.2023.05.12.13.49.51; Fri, 12 May 2023 13:49:52 -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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20221208 header.b=VhkRQ5uS; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A1CA068C0D4; Fri, 12 May 2023 23:49:48 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ua1-f45.google.com (mail-ua1-f45.google.com [209.85.222.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4319A68BEEC for ; Fri, 12 May 2023 23:49:42 +0300 (EEST) Received: by mail-ua1-f45.google.com with SMTP id a1e0cc1a2514c-780bb3b96e0so5018783241.0 for ; Fri, 12 May 2023 13:49:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683924580; x=1686516580; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=cExxUgysIc7tadgBxaohkKD086cXHvVimc9LGsjvc28=; b=VhkRQ5uSqglJGq/jkthAfwsh/l1aX8m588xdNuAihixPYaRsVmcWab8jGtSwIlMC+j 5rGrVpWpdcIoLrSgehQBv/5X27YOk8V1z4LNnT7pzu3P3t9/uHoFi3yypeaaISwVbnaZ lqT0/9HAXIvTqZEQLLdbY1SCHLB3On95W7Zk1l4C9GEppYNeXmcG+wvcPyVkmFD0fvJt Uj6PTCyuCIiBrauR+E0s/Q/PsVIiPRqtM+W7gCZdMcx+j2/oFMYi/zIUbk1SIj/LD8rk IQxbXg6qychorZUXUhvSgiz7Z8HcZZMCZHj1pQsnrWnZ23OvtOijA86+v53S/6Ng3+RY gQog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683924580; x=1686516580; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=cExxUgysIc7tadgBxaohkKD086cXHvVimc9LGsjvc28=; b=hUdcme6v7Bz/7dpdqVrdsnXESPtEx3BJ34a3imf3S0V0dCa9/7NM7S+QT/iuBSc3yo yfmftZ539a/acrMrbVj41H33Y0jaJVEnFTcLFbe6ZW1tuPzGK5w1pwf3Oxi59G69pqec WUKwCp1uAeFcemp/wyFt5wgVVd4wyBgzqCV1W8JSHruzbTiSJEo3SdCCoz160TJSoaBi bQB6NFdg60z7uRIklu8Pl7ugIkDVy+gsbl4hbmXK/YJX+4y9rFDMzV7oNa0+usYqsnRZ WpN4XUM1hnDMHKMG84Xhurnh/q1KFO49qhmrRf15HAmzWym2lpHfc0az3QUmUdCxuEH6 EfGQ== X-Gm-Message-State: AC+VfDwqO+uNZas936A2Zsj0r0bW+0V0jmpRfiFCv1Ipk1s5hm1CswZG PAlSJIDkhkkWcj0bTIccR5UAOeRoErG5KNSHkARnjl9v X-Received: by 2002:a1f:41ca:0:b0:44f:e32a:13d with SMTP id o193-20020a1f41ca000000b0044fe32a013dmr9873629vka.5.1683924580490; Fri, 12 May 2023 13:49:40 -0700 (PDT) MIME-Version: 1.0 From: Paul B Mahol Date: Fri, 12 May 2023 22:49:07 +0200 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [FFmpeg-devel] [PATCH] avfilter/avfiltergraph: fix illogical flaws in code 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: 08rjlAmKqFBq Attached. From 11907ee612b0440faeb3804e8f9af5e36a63db89 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Fri, 12 May 2023 21:01:41 +0200 Subject: [PATCH] avfilter/avfiltergraph: fix illogical flaws in code Signed-off-by: Paul B Mahol --- libavfilter/avfiltergraph.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 53f468494d..744f480e1d 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -748,8 +748,10 @@ static int reduce_formats_on_filter(AVFilterContext *filter) (KNOWN(fmt) || fmts->all_counts)) { /* Turn the infinite list into a singleton */ fmts->all_layouts = fmts->all_counts = 0; - if (ff_add_channel_layout(&outlink->incfg.channel_layouts, fmt) < 0) - ret = 1; + ret = ff_add_channel_layout(&outlink->incfg.channel_layouts, fmt); + if (ret < 0) + return ret; + ret = 1; break; } -- 2.39.1