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 F33C94A432 for ; Thu, 28 Mar 2024 03:13:15 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 48C9368D705; Thu, 28 Mar 2024 05:12:51 +0200 (EET) Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A15F268D6EC for ; Thu, 28 Mar 2024 05:12:43 +0200 (EET) Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-60a0579a968so5706327b3.3 for ; Wed, 27 Mar 2024 20:12:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711595561; x=1712200361; 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=9dPWoA+GcJGFC8wal8ajeYcxIht0aZugqkwY6xMJPsE=; b=SEo4psK2evoiv40q8yJ+HeB7YLC0DcI70sFHzZHi5ATEheFclKAK+TdRxitSXvi/eu MNPEXSbD1WLC2sw4ycgOwemZ8Ujr3Od+Qkst4futE0indZFxaGn/2CovboUc9V+42Mb1 9ybhn8dj2px0WSJO9izlvuXk6lXd6V3vwJy5kJ7F+jEsI+D0VCmyPsnd7lXWvvVLBMSK ByTD3NbiSP9OzVmALz+WJYw76v1eZY7mi4IhkRPGPgtqlXLG20uV+rhlEAboium7+Gal iReua/1vCOxjd0dNL6wOr5cp21l9QRDrFUDIPNraaAD/FYKp9T6jD/ZeXcgM0uWwSuAm on+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711595561; x=1712200361; 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=9dPWoA+GcJGFC8wal8ajeYcxIht0aZugqkwY6xMJPsE=; b=J5YfnAJcUkfJW3L0r/j8rIGfLpZqSiDMkrARX5yitnHtgLVB4JLWnAhT1DRXCTczfG j+fwLH2MTp5sH5S56DdMF3KA662DF+jZ5mE0l//+eQdVpNL/ybDVXPAcR1Vvk6H42wFR ZGOEteKwoUS5vSzZm7x8vECOMG/CqYyVr5/Z94LSJZqvgUu+lUY180I5PUyXD9KNjK+o MYMp5lzL10VHVyBCavnZJe5/eK2Z3NWspsBzwEpIsBReUzjxiqlRPAeXPPxEx8X0fQHa R2nS8vfUyv5TZpA38xc7xgSC2tztd6GFMUBNYQwFi1kOB/De6RUTbLFH9SOKKThIo6Pa sOnw== X-Gm-Message-State: AOJu0YwE3ZRTkN38lS/FPDKYQb6exwGoA5u6F0N89I8v8y4R/0W9afoI C1A3CX1Rfl6DJCjPrLxVVhxtHUv+Ly6WDb7YXOO/FeG8Fvxsrg1P3BXa4jPo X-Google-Smtp-Source: AGHT+IERZyDU/WYyjLPMiQGyKoAh0108miNFLW82WCeDzop4VZM+802nF79dRUBC7FZRB05eRAN2+A== X-Received: by 2002:a5b:747:0:b0:dcb:d653:8ad9 with SMTP id s7-20020a5b0747000000b00dcbd6538ad9mr1687799ybq.12.1711595560858; Wed, 27 Mar 2024 20:12:40 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id q20-20020a635054000000b005dc120fa3b2sm249964pgl.18.2024.03.27.20.12.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 20:12:40 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 28 Mar 2024 00:12:07 -0300 Message-ID: <20240328031210.21407-4-jamrial@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240328031210.21407-1-jamrial@gmail.com> References: <20240328031210.21407-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/7 v4] 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 d27998d1f4..f54c1fa472 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -965,6 +965,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 3e5d170a5b..da78aeea7f 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -1156,6 +1156,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".