#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
typedef struct BRPixContext {
AVFrame frame;
}
static int brpix_decode_frame(AVCodecContext *avctx,
- void *data, int *data_size_out,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
BRPixContext *s = avctx->priv_data;
if (hdr.width != avctx->width || hdr.height != avctx->height)
avcodec_set_dimensions(avctx, hdr.width, hdr.height);
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
}
*frame_out = s->frame;
- *data_size_out = sizeof(AVFrame);
+ *got_frame = 1;
return avpkt->size;
}