From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 5EC0747628 for ; Tue, 14 Nov 2023 15:31:35 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B661F68CD34; Tue, 14 Nov 2023 17:31:32 +0200 (EET) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0833768CBF0 for ; Tue, 14 Nov 2023 17:31:27 +0200 (EET) Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-53fa455cd94so4035715a12.2 for ; Tue, 14 Nov 2023 07:31:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699975885; x=1700580685; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=nGirFjLyo/uFvaDiHDtve18fZCOr+J8tTkikpHOYpPg=; b=d41actA5Sv496ilQ28c1t6XL4S6HMAN17YIq7y8F03Ab86s7o3Wh1/DXyKzCnPM/SB gsqCyD8yeb+dyZYnijg6QIxYQxfgvJUWjrWw56Kpr/maT1ocnw4TEdfin+eZa9LbU/Lr lp4PNAbYQmS2cW+I3LdkrXqEJljG4ANIBOA2LW/9XMzL532yfczOxNxL4L1JmE0IOtMJ FCFdfOIM+BZsx/vnrzGa36f4tcEtfakBgAUXO4bhuXslOxPsYRlLxJbIDsbyxIFM+B68 MWh6D76e5qdgqOhXXlETQezGt6P3tAwFCb3DMlsj7EUFWtWqh7uJW6bPSMkQ+JcbpYCs 6qXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699975885; x=1700580685; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nGirFjLyo/uFvaDiHDtve18fZCOr+J8tTkikpHOYpPg=; b=CRHire6Atcl8lHPlEM30p1AFIFGkQHhEh7HanvI9ps3lr/3+YLEE2ARx3+5K9p+RSJ 0JYclaT3h8lZ6TjA1y5ghgyOJyj7Fx38ym5iqCiO1TXCyMx6Zk0F00EYG/eyZGxxOmFU E7zXnfD4bigqzpoIvdY/0KvIMI1s06hbcZ2AGWro4D/KNXhdxekVEKW9VFsn+aWMtsOW tfiU5Oq4hEG+Y7PN9PDIi2y3JWJsb874UawWWr4KrLRLvxlguttbtRYf7PiNbTNw08cY t1kxO+ejSLBOfrmBujRrMOLRU1Q2208JZWCxV547R0mJnATur5jSVPH85OGKnkT+dSrp OQIQ== X-Gm-Message-State: AOJu0YwjOHE6ozEJx0JLC8UTyB4Gyu2rAKI6Yv3eH//uzCvHtzM5rD8e DzsXHr5NAzCLQHQ856t3esLmoDnGDd0= X-Google-Smtp-Source: AGHT+IHUjoyfSq8Xz2mpEf1mqsiTJycxubwz0HtJZb4tgpRSnk0pOf/Jjy3WQ+FIGCxbvg0umN1rgw== X-Received: by 2002:a17:90b:11cc:b0:280:4c83:5f31 with SMTP id gv12-20020a17090b11cc00b002804c835f31mr6748141pjb.48.1699975884645; Tue, 14 Nov 2023 07:31:24 -0800 (PST) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id 6-20020a17090a194600b002810dc1028dsm8039181pjh.34.2023.11.14.07.31.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 07:31:24 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Tue, 14 Nov 2023 12:31:37 -0300 Message-ID: <20231114153138.2744-1-jamrial@gmail.com> X-Mailer: git-send-email 2.42.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/hevcdec: don't store stale HDR10+ values 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: This metadata is signaled per frame. If not present in an AU, then the previous values should not be used. Should fix ticket #10541. Signed-off-by: James Almer --- libavcodec/hevcdec.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index 3ce845dddb..13c37e1e3b 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -2805,14 +2805,12 @@ static int set_side_data(HEVCContext *s) } if (s->sei.common.dynamic_hdr_plus.info) { - AVBufferRef *info_ref = av_buffer_ref(s->sei.common.dynamic_hdr_plus.info); - if (!info_ref) - return AVERROR(ENOMEM); - - if (!av_frame_new_side_data_from_buf(out, AV_FRAME_DATA_DYNAMIC_HDR_PLUS, info_ref)) { - av_buffer_unref(&info_ref); + if (!av_frame_new_side_data_from_buf(out, AV_FRAME_DATA_DYNAMIC_HDR_PLUS, + s->sei.common.dynamic_hdr_plus.info)) { + av_buffer_unref(&s->sei.common.dynamic_hdr_plus.info); return AVERROR(ENOMEM); } + s->sei.common.dynamic_hdr_plus.info = NULL; } if (s->rpu_buf) { -- 2.42.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".