#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
enum VBFlags{
VB_HAS_GMC = 0x01,
return 0;
}
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+ AVPacket *avpkt)
{
VBDecContext * const c = avctx->priv_data;
uint8_t *outptr, *srcptr;
if(c->pic.data[0])
avctx->release_buffer(avctx, &c->pic);
c->pic.reference = 3;
- 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;
}
FFSWAP(uint8_t*, c->frame, c->prev_frame);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->pic;
/* always report that the buffer was completely consumed */