summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-03-06 12:35:48 -0300
committerJames Almer <jamrial@gmail.com>2021-03-10 20:26:36 -0300
commitdbd47b7990efb48dd2f8ab2d396a6aff2a98c250 (patch)
tree8fe586be72b630c09482c0dc08b4c4dde838de21 /libavutil
parent14040a1d913794d9a3fd6406a6d8c2f0e37e0062 (diff)
avutil/frame: change av_frame_new_side_data() size parameter type to size_t
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/frame.c2
-rw-r--r--libavutil/frame.h8
2 files changed, 9 insertions, 1 deletions
diff --git a/libavutil/frame.c b/libavutil/frame.c
index eab51b6a32..75e347bf2f 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -725,7 +725,7 @@ AVFrameSideData *av_frame_new_side_data_from_buf(AVFrame *frame,
AVFrameSideData *av_frame_new_side_data(AVFrame *frame,
enum AVFrameSideDataType type,
- int size)
+ buffer_size_t size)
{
AVFrameSideData *ret;
AVBufferRef *buf = av_buffer_alloc(size);
diff --git a/libavutil/frame.h b/libavutil/frame.h
index 1aeafef6de..7d1f8e2935 100644
--- a/libavutil/frame.h
+++ b/libavutil/frame.h
@@ -220,7 +220,11 @@ enum AVActiveFormatDescription {
typedef struct AVFrameSideData {
enum AVFrameSideDataType type;
uint8_t *data;
+#if FF_API_BUFFER_SIZE_T
int size;
+#else
+ size_t size;
+#endif
AVDictionary *metadata;
AVBufferRef *buf;
} AVFrameSideData;
@@ -913,7 +917,11 @@ AVBufferRef *av_frame_get_plane_buffer(AVFrame *frame, int plane);
*/
AVFrameSideData *av_frame_new_side_data(AVFrame *frame,
enum AVFrameSideDataType type,
+#if FF_API_BUFFER_SIZE_T
int size);
+#else
+ size_t size);
+#endif
/**
* Add a new side data to a frame from an existing AVBufferRef