From patchwork Wed Jan 10 09:05:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 45553 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:bf2f:b0:199:de12:6fa6 with SMTP id gc47csp918754pzb; Wed, 10 Jan 2024 01:06:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IEric91yOqQ887pyzkAh6zatyJLyQ4i9QgEymorraePI89H61DaaZzSv/ptZVrlX6kHq35o X-Received: by 2002:a17:907:d9e:b0:a2a:9e60:9e1e with SMTP id go30-20020a1709070d9e00b00a2a9e609e1emr466289ejc.100.1704877570685; Wed, 10 Jan 2024 01:06:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704877570; cv=none; d=google.com; s=arc-20160816; b=k3PkBIRw8xVI0Wx1kxOvWZYF05i9wMi6mYdBLag/ohs7Y5rxQ0OErIgUlwnVPr9CbC /6gWgcRwux4x13CBMJaxEPUX5HIIUqs2Ye13JGAUH+0WzkOPlH07s4DAvNnaW0Kbs3N0 ZymbsetKhoHRHoYgvdZyVpaoBZAWcVvR2+TjtObinACYpJznYj7LTk/24CZg3EyvhwFy wtFPnp/Ys1A2l52zoJwVzvQHzu0WVSrDkL/GYb5V2mdK2vrZixtUk3jp+nrhm0bGSftc dg0L9ELsI+zaQ8TjeWtlpZ9OftX9mHBWAW5DVFbxh6+mcEnVuYnUH5RKoOwPa0kPl3mj qgsA== 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=N5MkNmfBKkI0JgaaFZl25mVbV/ZyrDKoN3tspIXAkds=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=wYx4+NXUubx2PGz5Og3xQPc4q9va3ZmR63JDex+XUsJoGWAIsJhuOuw73Xus6mMXzu ocJjgXSo8IaCNB+0sLZgNacmr8hw2DRD6Kbj54zlI2ulQMwZKOWLZcIk3m46mwUPThMu JoT7d8fY5Q/0KdE8weCaW7cayOOZJVQpsRUkbxfvrSl+jHVinYE+DyHYd/vZu97Aa7/1 P3GfdrSPSUTsMTSF2HjshTKwQEglB3lXp1vi4qqhbqsAlV4T9BNqvj3Zs5ZvZtJ9SSsi RzQW+EaiblM+apM29tMDmGypzGfP/YGyUVj3vIgZVczDgPfK0TfLsjvEijQ4VDbqbeSa 61jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=jh23eUZT; 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 mc27-20020a170906eb5b00b00a2bf9d322b0si105722ejb.855.2024.01.10.01.06.10; Wed, 10 Jan 2024 01:06:10 -0800 (PST) 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=jh23eUZT; 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 F256368C8F6; Wed, 10 Jan 2024 11:05:58 +0200 (EET) 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 E4C7968CE3E for ; Wed, 10 Jan 2024 11:05:51 +0200 (EET) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 535F0414B5; Wed, 10 Jan 2024 10:05:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1704877551; bh=1FoLUeMnZK6qQwE/IITNIzR7ui5iNMXPdkQLM5A6SiM=; h=From:To:Cc:Subject:Date:From; b=jh23eUZTxveMzScoQTlIOX3GTh+z758hfnFjmParxOTKNeUWGe5BeYLb9SG/GVoWh yH/+ygq04lYm+pVcDE18ScOIUzsglb3x3On5fb8C051i++GsHfUCEhR0rWWsoy+kmF oOiK/dJTOh0/v+4EClKD2jeyOz/fENmxJ63heJvc= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Wed, 10 Jan 2024 10:05:46 +0100 Message-ID: <20240110090547.69151-1-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] fftools/ffplay: add missing YUV metadata to buffersrc 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: laPdPuCMiEXw From: Niklas Haas Fixes error spam from the `ffplay` tool since commit 2d555dc82d, caused by an oversight on my part - I didn't notice during development that `ffplay` goes through its own filtering code path separate from fftools/ffmpeg_filter.c --- fftools/ffplay.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 17861e60be..0771326d76 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -1881,10 +1881,12 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c graph->scale_sws_opts = av_strdup(sws_flags_str); snprintf(buffersrc_args, sizeof(buffersrc_args), - "video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d", + "video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d:" + "colorspace=%d:range=%d", frame->width, frame->height, frame->format, is->video_st->time_base.num, is->video_st->time_base.den, - codecpar->sample_aspect_ratio.num, FFMAX(codecpar->sample_aspect_ratio.den, 1)); + codecpar->sample_aspect_ratio.num, FFMAX(codecpar->sample_aspect_ratio.den, 1), + frame->colorspace, frame->color_range); if (fr.num && fr.den) av_strlcatf(buffersrc_args, sizeof(buffersrc_args), ":frame_rate=%d/%d", fr.num, fr.den);