]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/decklink_enc.cpp
avutil/buffer: Switch AVBuffer API to size_t
[ffmpeg] / libavdevice / decklink_enc.cpp
index 04b06aee3ab6cbeef9777a09b72ab9e4275da6e7..4c1eb05be4b3c6895501aa6e44ddc86ff38a1fb0 100644 (file)
@@ -32,6 +32,7 @@ extern "C" {
 
 extern "C" {
 #include "libavformat/avformat.h"
+#include "libavutil/internal.h"
 #include "libavutil/imgutils.h"
 #include "avdevice.h"
 }
@@ -312,7 +313,8 @@ static void construct_cc(AVFormatContext *avctx, struct decklink_ctx *ctx,
     uint16_t *cdp_words;
     uint16_t len;
     uint8_t cc_count;
-    int size, ret, i;
+    size_t size;
+    int ret, i;
 
     const uint8_t *data = av_packet_get_side_data(pkt, AV_PKT_DATA_A53_CC, &size);
     if (!data)
@@ -436,7 +438,7 @@ static int decklink_write_video_packet(AVFormatContext *avctx, AVPacket *pkt)
     AVFrame *avframe = NULL, *tmp = (AVFrame *)pkt->data;
     AVPacket *avpacket = NULL;
     decklink_frame *frame;
-    buffercount_type buffered;
+    uint32_t buffered;
     HRESULT hr;
 
     if (st->codecpar->codec_id == AV_CODEC_ID_WRAPPED_AVFRAME) {
@@ -525,7 +527,7 @@ static int decklink_write_audio_packet(AVFormatContext *avctx, AVPacket *pkt)
     struct decklink_cctx *cctx = (struct decklink_cctx *)avctx->priv_data;
     struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
     int sample_count = pkt->size / (ctx->channels << 1);
-    buffercount_type buffered;
+    uint32_t buffered;
 
     ctx->dlo->GetBufferedAudioSampleFrameCount(&buffered);
     if (pkt->pts > 1 && !buffered)