#include "dsputil.h"
#include "binkdata.h"
#include "binkdsp.h"
+#include "internal.h"
#include "mathops.h"
#define BITSTREAM_READER_LE
return 0;
}
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *pkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *pkt)
{
BinkContext * const c = avctx->priv_data;
GetBitContext gb;
if(c->pic.data[0])
avctx->release_buffer(avctx, &c->pic);
- if(avctx->get_buffer(avctx, &c->pic) < 0){
+ if(ff_get_buffer(avctx, &c->pic) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
}
emms_c();
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->pic;
if (c->version > 'b')
.close = decode_end,
.decode = decode_frame,
.long_name = NULL_IF_CONFIG_SMALL("Bink video"),
+ .capabilities = CODEC_CAP_DR1,
};