#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
typedef struct YopDecContext {
AVFrame frame;
s->dstptr += 2;
}
-static int yop_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int yop_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
YopDecContext *s = avctx->priv_data;
return AVERROR_INVALIDDATA;
}
- ret = avctx->get_buffer(avctx, &s->frame);
+ ret = ff_get_buffer(avctx, &s->frame);
if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
yop_next_macroblock(s);
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame *) data = s->frame;
return avpkt->size;
}