From patchwork Mon Mar 4 13:06:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 46773 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:a919:b0:19e:cdac:8cce with SMTP id cd25csp2791139pzb; Mon, 4 Mar 2024 05:11:34 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVhF0WlptvJ6fJ3WtjsXXMdD6HoVVV8vsGSJomEdJBJsTZ8pfIN43dNF0ytykodFiZ29TD8c8Jdfa3GXBP+XxjfCgLnSLy3YMINaw== X-Google-Smtp-Source: AGHT+IG6zfWHfDgylvEBEujM33qDrzfJPexgiJSIXqKaYWK7VIlOQd17ozWGYvMYkn9boKF6054Q X-Received: by 2002:a17:906:2b4e:b0:a45:622e:a0b9 with SMTP id b14-20020a1709062b4e00b00a45622ea0b9mr1115709ejg.64.1709557893869; Mon, 04 Mar 2024 05:11:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709557893; cv=none; d=google.com; s=arc-20160816; b=IGXrzdPQ7NHWdGK5dFctbIYGHT7eKGKjKvYs0vscx/phw0IZfkiuwWySr48sFwYY2u K4qnQRq68DqSvSSTOPehJ2bd8O0TzrPAKVqfrqAT/1AqO3PS8B6zoJ31uqStnaKbsz1T 7Oio2WIUgbX7nppFQHMngoW+BBWuoN7A2IrCq6USK0tJnrC9ZyNQZiEDyAlvnu0riwHI hspsH1yWhCQ2FM/FV1mVeeS+DzUxNNRxLLWUhY+xdzrLG81be920gAVwyU9WR28wJm03 WN3Q9SjlhrSmExAXuSgoWLKXhIp5Hpdx81Z+Wr3RafjTlQ1G3s110I6KhGL3qPggyRz/ CyCg== 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=y+of1aZpx7f73uhGiyVGSs/lV/zH8i5xuRub2UjNs9U=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=l1JNNt/rgeGyfrGe5iDUF+Y5Ri78igAK7YqEdm/0WXbuFL4IxXQWmCfbq7P53gyXmt phcUOf7AE6IqflTjgTfOCiOoQnVcbA4S/RQX6FmJxhblwrAo+WD5xbfTbshtmrShxSzt ASCM+koT1Exw0zEa8/QWzAUKwcEaPSpRGpJvHXzwWV8wNJq4Zn23K1kCwCcrFLUo40IK H3QcBUagCLVzbg7+UO/tmQTGQukiEVa0EHY3X7HlFvGcsW2nUOArWsonFYtrTOHmWyjB /oJoD4ar5G0YjzcY0PuMLlReNkt0rc9vO9SltrFdQDfjJ7eWrbD+Ee/g5RuRKU3xrqFg lH4A==; 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="Swxp/wAN"; 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 a8-20020a1709064a4800b00a3f2418fcb8si3853214ejv.396.2024.03.04.05.11.33; Mon, 04 Mar 2024 05:11:33 -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=@khirnov.net header.s=mail header.b="Swxp/wAN"; 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 AED9868D447; Mon, 4 Mar 2024 15:07:40 +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 C734A68D450 for ; Mon, 4 Mar 2024 15:07:14 +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=Swxp/wAN; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id B78F24D64 for ; Mon, 4 Mar 2024 14:07:11 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id dOH1Srh1SJ63 for ; Mon, 4 Mar 2024 14:07:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1709557626; bh=ip1I1zcNNW+YtqGnf81QxcpbDB3WTZXLkX9wbxU0/WA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Swxp/wAN6Oh9mJJKn8ECro+pCVVMZuocc+Q3wzFKE41QDuBwNGOa+Rjm4RGAXdY/L TEQZNQFfMkF8kHqrgoFxsKb8gEkf9oAk0EpS/XUTSGElmCEjlE3L3H4wp8Pmk+O+BM MoCNE1GLlhsv9n/XR1/mITFEr0qU1kZ/zlLaFn5/Rwq0W9kSZJYgJQdV/MBhDFVCnV tLbuFWLy7n8Z2MXJFoCV+x6WMU1Ux8EN/lOcIlhneqLKGns/jDqQU2yF7rUp8aA4Z4 xD/HjW+tSZlNQLPt+qfFOBcmBPUdeF2ReRpTQeeRiwr7ElA0ejogrBBYMTt+H2B+i8 HojX3/sbFDwDw== 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 ACE6B4D6C for ; Mon, 4 Mar 2024 14:07:06 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id D28EC3A167C for ; Mon, 4 Mar 2024 14:07:00 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Mar 2024 14:06:36 +0100 Message-ID: <20240304130657.30631-21-anton@khirnov.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240304130657.30631-1-anton@khirnov.net> References: <20240304130657.30631-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 21/29] avcodec/libdav1d: respect side data preference 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: iLF2eE8Yroai From: Niklas Haas Signed-off-by: Anton Khirnov --- libavcodec/libdav1d.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c index 78a5c63bf4..3714137ed0 100644 --- a/libavcodec/libdav1d.c +++ b/libavcodec/libdav1d.c @@ -561,8 +561,9 @@ FF_ENABLE_DEPRECATION_WARNINGS if (!res) break; - if (!av_frame_new_side_data_from_buf(frame, AV_FRAME_DATA_A53_CC, buf)) - av_buffer_unref(&buf); + res = ff_frame_new_side_data_from_buf(c, frame, AV_FRAME_DATA_A53_CC, &buf, NULL); + if (res < 0) + goto fail; c->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS; break;