diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-04-14 14:59:32 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2021-04-27 10:43:13 -0300 |
commit | ef6a9e5e311f09fa8032974fa4d0c1e166a959bb (patch) | |
tree | b9b1893c45771cde9f36853685a5bc8a6b5cf27c /libavcodec/decode.c | |
parent | 985c0dac674846721ec8ff23344c16ac7d1c9a1e (diff) | |
download | ffmpeg-ef6a9e5e311f09fa8032974fa4d0c1e166a959bb.tar.gz |
avutil/buffer: Switch AVBuffer API to size_t
Announced in 14040a1d913794d9a3fd6406a6d8c2f0e37e0062.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/decode.c')
-rw-r--r-- | libavcodec/decode.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 9e5230ae1d..cd98c98a97 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -67,7 +67,7 @@ typedef struct FramePool { static int apply_param_change(AVCodecContext *avctx, const AVPacket *avpkt) { int ret; - buffer_size_t size; + size_t size; const uint8_t *data; uint32_t flags; int64_t val; @@ -344,7 +344,7 @@ static inline int decode_simple_internal(AVCodecContext *avctx, AVFrame *frame, got_frame = 0; } else if (avctx->codec->type == AVMEDIA_TYPE_AUDIO) { uint8_t *side; - buffer_size_t side_size; + size_t side_size; uint32_t discard_padding = 0; uint8_t skip_reason = 0; uint8_t discard_reason = 0; @@ -1463,7 +1463,7 @@ int avcodec_default_get_buffer2(AVCodecContext *avctx, AVFrame *frame, int flags static int add_metadata_from_side_data(const AVPacket *avpkt, AVFrame *frame) { - buffer_size_t size; + size_t size; const uint8_t *side_metadata; AVDictionary **frame_md = &frame->metadata; @@ -1502,7 +1502,7 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame) frame->pkt_size = pkt->size; for (int i = 0; i < FF_ARRAY_ELEMS(sd); i++) { - buffer_size_t size; + size_t size; uint8_t *packet_sd = av_packet_get_side_data(pkt, sd[i].packet, &size); if (packet_sd) { AVFrameSideData *frame_sd = av_frame_new_side_data(frame, @@ -1841,14 +1841,15 @@ FF_ENABLE_DEPRECATION_WARNINGS int ff_copy_palette(void *dst, const AVPacket *src, void *logctx) { - buffer_size_t size; + size_t size; const void *pal = av_packet_get_side_data(src, AV_PKT_DATA_PALETTE, &size); if (pal && size == AVPALETTE_SIZE) { memcpy(dst, pal, AVPALETTE_SIZE); return 1; } else if (pal) { - av_log(logctx, AV_LOG_ERROR, "Palette size %d is wrong\n", size); + av_log(logctx, AV_LOG_ERROR, + "Palette size %"SIZE_SPECIFIER" is wrong\n", size); } return 0; } |