diff mbox series

[FFmpeg-devel,v0,05/14] avutil/frame: add helper for clearing out side data sets

Message ID 20230320233408.134255-6-jeebjp@gmail.com
State New
Headers show
Series encoder AVCodecContext configuration side data | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Jan Ekström March 20, 2023, 11:33 p.m. UTC
---
 libavutil/frame.c | 5 +++++
 libavutil/frame.h | 7 +++++++
 2 files changed, 12 insertions(+)
diff mbox series

Patch

diff --git a/libavutil/frame.c b/libavutil/frame.c
index 019613e4d2..24038cc0fa 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -90,6 +90,11 @@  static void wipe_side_data_from_frame(AVFrame *frame) {
     wipe_side_data(&frame->side_data, &frame->nb_side_data);
 }
 
+void av_side_data_set_wipe(AVFrameSideDataSet *set)
+{
+    wipe_side_data(&set->side_data, &set->nb_side_data);
+}
+
 AVFrame *av_frame_alloc(void)
 {
     AVFrame *frame = av_malloc(sizeof(*frame));
diff --git a/libavutil/frame.h b/libavutil/frame.h
index 45024c2a03..734ac3fe75 100644
--- a/libavutil/frame.h
+++ b/libavutil/frame.h
@@ -991,6 +991,13 @@  int av_frame_apply_cropping(AVFrame *frame, int flags);
  */
 const char *av_frame_side_data_name(enum AVFrameSideDataType type);
 
+/**
+ * Clear all side data from a side data set
+ *
+ * @param set the set which should be cleared
+ */
+void av_side_data_set_wipe(AVFrameSideDataSet *set);
+
 /**
  * @}
  */