From patchwork Fri Mar 22 20:28:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 47329 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1014:b0:1a3:ac71:9534 with SMTP id nk20csp163371pzb; Fri, 22 Mar 2024 13:29:53 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWvXPy2PcrlK/fKsGSjm1mE/WX+3PDMTOOMwZfzTovDoTeThTdi9latGW9XcwSAVh/2eO/bGwqIur0T+5l7NvdB4tK7eL7+iRGh3Q== X-Google-Smtp-Source: AGHT+IHf+2PCAeS/cxu+rhPAF9M/upKARX4l5QuCVdSzBrsjyvjmJQGayKYk/4h2f1jI8v0iMT5i X-Received: by 2002:a19:4350:0:b0:513:e677:7909 with SMTP id m16-20020a194350000000b00513e6777909mr291071lfj.5.1711139392927; Fri, 22 Mar 2024 13:29:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711139392; cv=none; d=google.com; s=arc-20160816; b=rADW5Y0C72i/hl/fvMUnOUzv4E4nC8KCv8rsojlQ+fdKsQ9o/yJN+B5yHgHXR7MPtn 6SEVOOCw+UD6PpfyF0LQbKwehYCzdv0keN2yWlDo6p1s7rWsjBilgr7w37NG2PT+mpqW wiSEXB38OphjDntRAqcyOTHeymxpKpSA0qq0R/1Nn7KTNyAHSBeOFcIw8JuU8TKMFIcs UpoftvZWU5iohmoxhcuNrEcy9377ki7be2SzU3m5hLf9kP9roSElXDiGDEfxA0CJGys2 WBlFbYYKCpMfrqySNOeK7cbNeEK0ku87fbPag/vNp3+GwBWM+ogvVldjbCj61wD5M5ne 3XZw== 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:dkim-signature:delivered-to; bh=2H0z4S6m4mOY3RgvSHFNnw+37ln+UaU1PfJMg8TnXvU=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=Wm+4/KdaIM5pcOU3A6W+I7s0G2jzyfyOK8dn3j1kJoa891O66SUDEcnilOJndwUlDl /Ihnayls1irk+N3Qg0X1D6fGRjE+RSwegjXEF6ZLZGren9QnEVnsOPUhT0gkWg5/8OXX 1TTiZnkeET8sMIL6lWKOlqQ2CIGD9h0YdQJCq8b5f/zBgJgpoHuW8QNEMQpN/R4Zf//h mqs99VI0ZNOSTCXtGYCVZw7+ypsUK7v2vu9OBlNTM71unbnI0bH5eDd4LLLz8+25LNGG QN/qpVslMVvTDfZyTNf1IHx5B6YH8gvyS3xwS9juFlDjr9QwftM2OKIBcakIv8Lp/KFF Tl6Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@khirnov.net header.s=mail header.b=din87Rpk; 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 y12-20020a50eb0c000000b0056bced776a1si160558edp.539.2024.03.22.13.29.52; Fri, 22 Mar 2024 13:29: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=@khirnov.net header.s=mail header.b=din87Rpk; 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 992AF68D4DB; Fri, 22 Mar 2024 22:29:08 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AD91768D4CE for ; Fri, 22 Mar 2024 22:29:01 +0200 (EET) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=din87Rpk; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id E99E44D62 for ; Fri, 22 Mar 2024 21:28:56 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id wkJPD4eisHRE for ; Fri, 22 Mar 2024 21:28:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1711139334; bh=ftt+9fIfb5RE1YhJoLr+5sjmzEce37aH51ty2kvNADk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=din87RpkQeou1/NVHs3UbfgKaIdKgezdO2rfs3+BnctWHUn/G4OYhljQX33W4pJzY FfFLlddP7g2VYBxQm+EH800N4s6gTL/i5OKOe+ZuBn3Ymhf+8gsSGzJDeBt+LIyWxs WUsiP56CVvcUtiIQfaWuKIEqURDBcsA9Um1paMKcB1Mi+LJZ3rVqDn/sp6CFJ8yJVt YQXr3xHTTjNLaTWTg/a9Kmz4LmgK/gjD3fbwJZwzhuzAhozLVE2khKE3GPvVf/CB17 Q3sx1vevBdCP+FZqDgj9NJgLB1VL+w7qChnSY1J4KeRWSIVKTjj/RT8x0EIBe9f5QQ zj0bzVicS89wg== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id 380454D44 for ; Fri, 22 Mar 2024 21:28:54 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 410423A076E for ; Fri, 22 Mar 2024 21:28:45 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 22 Mar 2024 21:28:32 +0100 Message-ID: <20240322202841.31730-3-anton@khirnov.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322202841.31730-1-anton@khirnov.net> References: <20240322202841.31730-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 03/12] fftools/cmdutils: do not use a random codec's private 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: WdPjhDkVETfY There is only a single caller of filter_codec_opts() that passes a NULL codec to it, which is streamcopy in ffmpeg CLI. In that case we only want generic AVCodecContext options, not private options of any specific encoder. --- fftools/cmdutils.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index f3c258bb99..1bb26f44f4 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -998,10 +998,6 @@ int filter_codec_opts(const AVDictionary *opts, enum AVCodecID codec_id, char prefix = 0; const AVClass *cc = avcodec_get_class(); - if (!codec) - codec = s->oformat ? avcodec_find_encoder(codec_id) - : avcodec_find_decoder(codec_id); - switch (st->codecpar->codec_type) { case AVMEDIA_TYPE_VIDEO: prefix = 'v';