av_stream_add_side_data() already defines size as a size_t, so this makes it
consistent across all side data functions.

Signed-off-by: James Almer <jamr...@gmail.com>
---
Same sitaution as Patch 3/4 but for av_stream_get_side_data().

 libavformat/avformat.h | 8 ++++++++
 libavformat/utils.c    | 8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 21c282a100..ae00c50a32 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -2183,7 +2183,11 @@ int av_stream_add_side_data(AVStream *st, enum 
AVPacketSideDataType type,
  * @return pointer to fresh allocated data or NULL otherwise
  */
 uint8_t *av_stream_new_side_data(AVStream *stream,
+#if FF_API_BUFFER_SIZE_T
                                  enum AVPacketSideDataType type, int size);
+#else
+                                 enum AVPacketSideDataType type, size_t size);
+#endif
 /**
  * Get side information from stream.
  *
@@ -2193,7 +2197,11 @@ uint8_t *av_stream_new_side_data(AVStream *stream,
  * @return pointer to data if present or NULL otherwise
  */
 uint8_t *av_stream_get_side_data(const AVStream *stream,
+#if FF_API_BUFFER_SIZE_T
                                  enum AVPacketSideDataType type, int *size);
+#else
+                                 enum AVPacketSideDataType type, size_t *size);
+#endif
 
 AVProgram *av_new_program(AVFormatContext *s, int id);
 
diff --git a/libavformat/utils.c b/libavformat/utils.c
index c9385318f6..03ddf955a2 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -5496,7 +5496,11 @@ int ff_generate_avci_extradata(AVStream *st)
 }
 
 uint8_t *av_stream_get_side_data(const AVStream *st,
+#if FF_API_BUFFER_SIZE_T
                                  enum AVPacketSideDataType type, int *size)
+#else
+                                 enum AVPacketSideDataType type, size_t *size)
+#endif
 {
     int i;
 
@@ -5549,7 +5553,11 @@ int av_stream_add_side_data(AVStream *st, enum 
AVPacketSideDataType type,
 }
 
 uint8_t *av_stream_new_side_data(AVStream *st, enum AVPacketSideDataType type,
+#if FF_API_BUFFER_SIZE_T
                                  int size)
+#else
+                                 size_t size)
+#endif
 {
     int ret;
     uint8_t *data = av_malloc(size);
-- 
2.26.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to