#include "libavutil/avassert.h"
#include "libavutil/common.h"
+#include "libavutil/internal.h"
#include "libavutil/log.h"
#include "libavutil/pixdesc.h"
#include "encode.h"
#include "avcodec.h"
-const AVCodecHWConfigInternal *ff_vaapi_encode_hw_configs[] = {
+const AVCodecHWConfigInternal *const ff_vaapi_encode_hw_configs[] = {
HW_CONFIG_ENCODER_FRAMES(VAAPI, VAAPI),
NULL,
};
for (buf = buf_list; buf; buf = buf->next)
total_size += buf->size;
- err = av_new_packet(pkt, total_size);
+ err = ff_get_encode_buffer(avctx, pkt, total_size, 0);
ptr = pkt->data;
if (err < 0)
}
static AVBufferRef *vaapi_encode_alloc_output_buffer(void *opaque,
- int size)
+ size_t size)
{
AVCodecContext *avctx = opaque;
VAAPIEncodeContext *ctx = avctx->priv_data;