From patchwork Wed Oct 11 14:55:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 44221 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4b22:b0:15d:8365:d4b8 with SMTP id fp34csp965264pzb; Wed, 11 Oct 2023 08:09:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFRQRC73FbHrb5XidyBLPvdWm/mcmfOPGxSBAcuF70ijzHL6SOPpk9doLZvQK0KCTjRAe0l X-Received: by 2002:aa7:d1d0:0:b0:530:bdb0:6cb3 with SMTP id g16-20020aa7d1d0000000b00530bdb06cb3mr18387473edp.28.1697036973549; Wed, 11 Oct 2023 08:09:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697036973; cv=none; d=google.com; s=arc-20160816; b=ctpglYFwa5JzEEj/KiBSoNONTYDeYIUcMAXXkCA1eVsgAvZ+C8/Ipu5gNSvCFm7unu 3iTyYmi08bzxlZqVA7OdJPNmNu5n9PRnECx+Wqv4zrSHZzVn0dkaloFmE4kEwswS0c1j 9cBG/shanErZwdHTmflrrR5ApCAVjy4D/UtWt4KHhZc5Yp05jKcGyJhDtBDTD2Qk6bke TU77KlqSk8rmF+8HmfzpfFeFyVySG1GYRCaGAWvN03kOrczsV0QrwANozRMafDJvrK7y SwhfYddZ4fXA7RmA/K8jlRttPHqgXSins8u0SLXsYU7KU3v8gJgMQk3K8F8Ukoc0vUaK ZM5g== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=dTzCZjz98CHfXwfqwTNzpR2ojN74IkDyJzH76eMcwDU=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=jiQFC9NdmXvP7HLl7DPpOmNWNahxos82E+ABIBqFq8dMtDg5Of1E5JNWojhoefRZow SW/N13ozwC6Gm1VdnR27wqdncIblNimL4stPY4CYaWX/aOXGhkRrIkb0mShy5KSZGptW Xx/lG14LG9ytubUMU1f0rtys/JfJ0xxnJAB7RY0wFN/U34+KyB0fVcdS+XlU1rgvDc8U /DSKwmrAaPx3/W8fHAaig6u6Z5UwMmuAV4FDr0B24EDrwe7tQeU8o9tkqk8Jqe5xe5px omGZlhDI6LTqpeVBVzoTDFvO1BcdWIvYczmvglSjiShkYzcGC9ftXwOsAWfQx0aXh8mS qIDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=IvyEzhH5; 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 ca5-20020aa7cd65000000b00533ce7c91cdsi6517542edb.493.2023.10.11.08.09.26; Wed, 11 Oct 2023 08:09:33 -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=@haasn.xyz header.s=mail header.b=IvyEzhH5; 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 ACE4E68CBDC; Wed, 11 Oct 2023 18:09:02 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1C4EF68CA90 for ; Wed, 11 Oct 2023 18:08:54 +0300 (EEST) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id C15344BBEF; Wed, 11 Oct 2023 17:08:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1697036933; bh=tixdK0gJzvO0cDnMbPHfUA6XEi1JOl3UUg3H5BFsomg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IvyEzhH5smI91wsxY4zEJAGZiY4OW6t27lWnDkfxPw8mGa/N/xuvFpZeBqpxnz/Et CBtOtDB76bQafnG4qFXFuFdbKGSM6/ikPj/0qaafqVnresurzuij8asAvn3zfNiBI+ 9AJpgG2KMAYxjniji++iAdw9G4iimmtXd4XQzoyA= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Wed, 11 Oct 2023 16:55:36 +0200 Message-ID: <20231011150848.117897-3-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231011150848.117897-1-ffmpeg@haasn.xyz> References: <20231011150848.117897-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/7] lavc/options: properly init AVCodecContext.colorspace 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: Niklas Haas Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: hcoOXTITIWkK From: Niklas Haas This currently defaults to AVCOL_SPC_RGB, but it should properly default to AVCOL_SPC_UNSPECIFIED, following the logic of the other fields. --- libavcodec/options.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/options.c b/libavcodec/options.c index a9b35ee1c3..c39218d7fb 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -123,6 +123,7 @@ static int init_context_defaults(AVCodecContext *s, const AVCodec *codec) s->pix_fmt = AV_PIX_FMT_NONE; s->sw_pix_fmt = AV_PIX_FMT_NONE; s->sample_fmt = AV_SAMPLE_FMT_NONE; + s->colorspace = AVCOL_SPC_UNSPECIFIED; #if FF_API_REORDERED_OPAQUE FF_DISABLE_DEPRECATION_WARNINGS