#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "internal.h"
static const enum AVPixelFormat pixfmt_rgb24[] = {
*
*/
static int decode_frame(AVCodecContext *avctx, void *data,
- int *data_size, AVPacket *avpkt)
+ int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
c->pic.reference = 0;
c->pic.buffer_hints = FF_BUFFER_HINTS_VALID;
- 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;
}
memcpy (c->pic.data[1], c->pal, AVPALETTE_SIZE);
}
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = c->pic;
/* always report that the buffer was completely consumed */