]> git.sesse.net Git - ffmpeg/commitdiff
avutil/frame: change av_frame_new_side_data() size parameter type to size_t
authorJames Almer <jamrial@gmail.com>
Sat, 6 Mar 2021 15:35:48 +0000 (12:35 -0300)
committerJames Almer <jamrial@gmail.com>
Wed, 10 Mar 2021 23:26:36 +0000 (20:26 -0300)
Signed-off-by: James Almer <jamrial@gmail.com>
doc/APIchanges
libavutil/frame.c
libavutil/frame.h

index 80e9b849c88bca07c230dec0a395ade3e358c104..7fa4ab705217e04c7b31a9def1af6bd5b9be9706 100644 (file)
@@ -15,9 +15,9 @@ libavutil:     2017-10-21
 
 API changes, most recent first:
 
-2021-03-10 - xxxxxxxxxx - lavu 56.68.100 - buffer.h
-  Change AVBufferRef related function and struct size parameter and fields
-  type to size_t at next major bump.
+2021-03-10 - xxxxxxxxxx - lavu 56.68.100 - buffer.h frame.h
+  Change AVBufferRef and relevant AVFrame function and struct size
+  parameter and fields type to size_t at next major bump.
 
 2021-03-04 - xxxxxxxxxx - lavc 58.128.101 - avcodec.h
   Enable err_recognition to be set for encoders.
index eab51b6a32702c3c5222c7339aface62ba29760e..75e347bf2f0a831d495186c3a8a5296c7a840c2f 100644 (file)
@@ -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);
index 1aeafef6de997041bb23f34d304f9203ca31a2e7..7d1f8e293579c491868a9be181bd8ddb5962ad96 100644 (file)
@@ -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