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 070FD4A4B5 for ; Thu, 28 Mar 2024 16:54:03 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 306E868D718; Thu, 28 Mar 2024 18:53:41 +0200 (EET) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F3B8568D68B for ; Thu, 28 Mar 2024 18:53:32 +0200 (EET) Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1e228c12468so1630585ad.1 for ; Thu, 28 Mar 2024 09:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711644810; x=1712249610; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=OGrR2Rxl/49lu/c1oondfET2GKTVsAC8QFRN/MFqP08=; b=YTCA6hKg7jgi/R9XNeFEY+IQV/Us0SWBdeQ3tNwUp3loeIaSBzBj3fNHZHSJWP3OzA hlDxjZerWAfFc0q3kw/evJ8u3Ain8nxsU43HWGph379lH+gG8z8PgldkudzB1JHhY1l4 AWmVlCZRFbCCL+MGt//yj4HLtEAUxWLIpvo26qeb66jusjawasaQVJ87O3I15zPnBelP OxbRyez2Eyow2bG7eN9N9GvR7Tc/x0+46otA2alvES4JUYb8S8TLSpFLrpEt0T1KRiae MxJ1G0mJvQK3UXwuIzFcr/mp48trLbFD/6TZG3hb0b+okW7+xXfpeS6EVmKFYk1ksVfe BHlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711644810; x=1712249610; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OGrR2Rxl/49lu/c1oondfET2GKTVsAC8QFRN/MFqP08=; b=dmXgLjjQcuCETw3HyK8lvXYw/OX1UPORaC1VdP8KjxyJXEe9tYUbcgLnHV7vfpd/NO y4S+V0yma1GCiCk02PTsPG9cgHMqR9FkeY/RPa+NXRSgz4YOjRn24FCY/MhptRlwMUyR blR4WlnE6eCnhlF5wtJ0dIsbvTvL8v3wUx6fmsW4V893krwbewbpnBvF9w026baGe21w 9/mmYnRHBL/JASnW2z/+N3K/PPRYn7va7BmYj6GMwojiMR4MC0x30kGDIzIS7KFLGkU0 wlJT/rPzKECe7h3iH1Xe1ct/ckVpBw0ujXNPmexIHQMYYGXsKOUGD8oT51TQ9n3xD8sX oMnw== X-Gm-Message-State: AOJu0YzEumypZEmrwqRZkXEZjmAJQ4UoitK6MhhH0L+r7oCshwlfPmtp vT4xDw4409i3QY/6mrSvzJ0np3v9+arw2Gh4/pqcppxsFikZ8u1jwN/35fyi X-Google-Smtp-Source: AGHT+IFmc+qD7fY/qi4GE5fveWa7nrBYbWngRtdqJ3awO36puuptSLJ06j4fIorppwKfi5VybpYiPw== X-Received: by 2002:a17:902:e74b:b0:1dd:dcd3:662c with SMTP id p11-20020a170902e74b00b001dddcd3662cmr4526879plf.4.1711644810248; Thu, 28 Mar 2024 09:53:30 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id w4-20020a1709029a8400b001d8f111804asm1822860plp.113.2024.03.28.09.53.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 09:53:29 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 28 Mar 2024 13:52:47 -0300 Message-ID: <20240328165250.64259-4-jamrial@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240328165250.64259-1-jamrial@gmail.com> References: <20240328165250.64259-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/7 v5] avutil/frame: add helper to remove side data of a given type from an array 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: Signed-off-by: James Almer --- libavutil/frame.c | 6 ++++++ libavutil/frame.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/libavutil/frame.c b/libavutil/frame.c index d37f1511e8..10b9f7fa94 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -937,6 +937,12 @@ const AVFrameSideData *av_frame_side_data_get_c(const AVFrameSideData * const *s return NULL; } +void av_frame_side_data_remove(AVFrameSideData ***sd, int *nb_sd, + enum AVFrameSideDataType type) +{ + remove_side_data(sd, nb_sd, type); +} + AVFrameSideData *av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type) { diff --git a/libavutil/frame.h b/libavutil/frame.h index 4885600dce..68a2ad1555 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -1149,6 +1149,11 @@ const AVFrameSideData *av_frame_side_data_get(AVFrameSideData * const *sd, nb_sd, type); } +/** + * Remove and free all side data instances of the given type from an array. + */ +void av_frame_side_data_remove(AVFrameSideData ***sd, int *nb_sd, + enum AVFrameSideDataType type); /** * @} */ -- 2.44.0 _______________________________________________ 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".