From patchwork Tue Apr 19 08:13:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Diederick C. Niehorster" X-Patchwork-Id: 35344 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b9e:b0:7d:cfb5:dc7c with SMTP id b30csp227581pzh; Tue, 19 Apr 2022 01:13:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCXAMEWB5h+ByfF5bGzq9+EFO5yfjNGde/6Lcx7DRtyLkcT/b8KF5SlQUDSlfb/hQFT5XA X-Received: by 2002:a17:906:4ad9:b0:6cf:93f:f77e with SMTP id u25-20020a1709064ad900b006cf093ff77emr12492746ejt.558.1650356029049; Tue, 19 Apr 2022 01:13:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650356029; cv=none; d=google.com; s=arc-20160816; b=M3jbkCl7vRUwqU8/+kvlpN6WMyMiLUVZvDzaSNZ13A7VSy0JAixMUWqNuiUiFFDb7X STWZGmJOI2DuFoZ/HWSqMorrd2CtgmKFibvdTrMJj2DzJUkI1YwoygIElvv9V6DENv0e ZgeTYE//vj9pui7nZtgzgdl0YtrQf50YR3Q4U+Zn5m2tq3qLJ1oDjiOdQAxLXr6rY8XE 4NvhPr9eXg3vapJGIFQ1SL4Woj/Ti+TjWrjxF4qy1FdZZ8+cfBLqeoDgt+hqdheK0HJU Ici6aIo3ZEnSI44WCgdMk0crPbE//1ohxYLqyTLkrS4VLq+yYiGcVYpGvcBV4PWWU69n JDGQ== 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 :dkim-signature:delivered-to; bh=P5225ClRlwqDnkbmsIGI+TNMqqp/C4pG519NqG6jd6M=; b=DwlOATPOq9NN0F3ypr1Nlo/jSI+n0vb9gACDNOLDQ39gY45f2fS//HAtkPeHCtvKax CLWw/GTjypy40qqgD+MK0mf6Bo/FRVlIXez6iCLBTFCSpyH9Hep5n7Ya3B3AZ8vmb0yL txTA34v1oAFCTi34lzkWd+4JzSzAc+7+dLSiGIWbD6A0T2QbQcyDDvC4I6U2Zt2PDPqS h3wyUUIHCURBkPyMl8GJa4rFjMJXmT9oM4FTCEck3VOwqLSamgspPYmyJfPzjtCCHq1L xOIEXSAEM+9smlcKSAg8gLjfSSniaxQOzZtBezRFVpoWYxhvKJm57lhQyzd/XrwAEDE9 c/nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=FKpkP4ld; 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 g21-20020aa7c595000000b0041d7dba939asi7673268edq.170.2022.04.19.01.13.48; Tue, 19 Apr 2022 01:13:49 -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=20210112 header.b=FKpkP4ld; 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 A794768B372; Tue, 19 Apr 2022 11:13:44 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9476168AE99 for ; Tue, 19 Apr 2022 11:13:38 +0300 (EEST) Received: by mail-lj1-f178.google.com with SMTP id o16so19527515ljp.3 for ; Tue, 19 Apr 2022 01:13:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=TZqQ4RymPfdaOCxHZyZ1f+OkAftJl/1dmzc8f4qgbuY=; b=FKpkP4ld3hNx55WkRes9DIItYVi/vbwVYaKDI4LShmQ8xGfdLQDJ4iElbMce1p/QBy ULqdK/kjl1Qvr7F3RnAOdkDhD5eC2X1YAkvftYGA+XUnDC/E/LAB80DPgUnCQlLZlkl3 BjgKU4kTnboTF+uNV4bzaDJAno7t2YijrDZFlLzQk4IG8nFvGflcdN5eF7kAdwNvC9gX v3ON0wWXS8UVAtenxF/7wnI/tO9kvsHE2uWX04CFeWUylx0ETMwpkEmU3UkztmwRiKUc G4+Qc6+khCP0fxLBu7TSEt1AAhquUmFYYhCVJWKklrEs5xJHbRFeFgFOyi61sIRkLubf K7fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=TZqQ4RymPfdaOCxHZyZ1f+OkAftJl/1dmzc8f4qgbuY=; b=hCJOglcufzjj5oCETO6gzDAkF7Z26CtPYkX6iEkgcwX7YOnocH78efoQ0QSyr+v7Q4 r/9z0Oob+/b1om+97uz42r60adMAVE+pN0ekxFCcML6VvTyF536on5Krd2voi85Q+X01 qipcNcImQiGCtzH03Bj7rOiSTnDNZEnUIo+BGVulY+eVwP5VGINJekGeAtwadvD1tm6C fm4ZwRwBIUGZLZ2Xf32bL2stjroTN4Raueapxqts3zvqkrFh7UIa0kZiVCCFH7afsXb7 Eaf3y0tzlBhpSdjgE64z3rQc9IKUfHCrhoN/YwrNGwhpx0yBRizk3SsTlN+lTl2dz5su ljiQ== X-Gm-Message-State: AOAM533lrVwuGLYfPmrQUAbFiAAdVZHqZFI3PwjAzpz75wFC8T7Tmq2L 5FF5XbEbG9heY0cr1aMDfV13nmy5dM1vFg== X-Received: by 2002:a05:651c:1185:b0:24d:a008:46f0 with SMTP id w5-20020a05651c118500b0024da00846f0mr9314956ljo.408.1650356017261; Tue, 19 Apr 2022 01:13:37 -0700 (PDT) Received: from localhost.localdomain (deedock.humlab.lu.se. [130.235.135.183]) by smtp.gmail.com with ESMTPSA id t5-20020a05651c204500b0024d9c71c0basm1407411ljo.92.2022.04.19.01.13.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Apr 2022 01:13:36 -0700 (PDT) From: Diederick Niehorster To: ffmpeg-devel@ffmpeg.org Date: Tue, 19 Apr 2022 10:13:18 +0200 Message-Id: <20220419081318.729-1-dcnieho@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avdevice/dshow: reuse unused variables. 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: Diederick Niehorster Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: fRzSlIC2TcoG Fix for f125c504d8fece6420bb97767f9e72414c26312a, requested_sample_rate and such should be used. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 1e69620880..5946a72cc2 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -1003,9 +1003,9 @@ dshow_cycle_formats(AVFormatContext *avctx, enum dshowDeviceType devtype, continue; } if ( - (ctx->sample_rate && ctx->sample_rate != fx->nSamplesPerSec) || - (ctx->sample_size && ctx->sample_size != fx->wBitsPerSample) || - (ctx->channels && ctx->channels != fx->nChannels ) + (requested_sample_rate && requested_sample_rate != fx->nSamplesPerSec) || + (requested_sample_size && requested_sample_size != fx->wBitsPerSample) || + (requested_channels && requested_channels != fx->nChannels ) ) { goto next; }