*/
#include "avcodec.h"
+#include "internal.h"
static av_cold int y216_decode_init(AVCodecContext *avctx)
{
}
static int y216_decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
AVFrame *pic = avctx->coded_frame;
const uint16_t *src = (uint16_t *)avpkt->data;
pic->reference = 0;
- if (avctx->get_buffer(avctx, pic) < 0) {
+ if (ff_get_buffer(avctx, pic) < 0) {
av_log(avctx, AV_LOG_ERROR, "Could not allocate buffer.\n");
return AVERROR(ENOMEM);
}
src += aligned_width << 1;
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame *)data = *pic;
return avpkt->size;