#include "libavutil/common.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
typedef struct BFIContext {
AVCodecContext *avctx;
}
static int bfi_decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
GetByteContext g;
int buf_size = avpkt->size;
bfi->frame.reference = 3;
- if (avctx->get_buffer(avctx, &bfi->frame) < 0) {
+ if (ff_get_buffer(avctx, &bfi->frame) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
src += avctx->width;
dst += bfi->frame.linesize[0];
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame *)data = bfi->frame;
return buf_size;
}