*/
#include "avcodec.h"
+#include "internal.h"
#include "mjpeg.h"
#include "mjpegdec.h"
#include "libavutil/imgutils.h"
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)
{
AVRnContext *a = avctx->priv_data;
AVFrame *p = &a->frame;
int y, ret, true_height;
if(a->is_mjpeg)
- return ff_mjpeg_decode_frame(avctx, data, data_size, avpkt);
+ return ff_mjpeg_decode_frame(avctx, data, got_frame, avpkt);
true_height = buf_size / (2*avctx->width);
if(p->data[0])
return AVERROR_INVALIDDATA;
}
- if((ret = avctx->get_buffer(avctx, p)) < 0){
+ if((ret = ff_get_buffer(avctx, p)) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
}
*(AVFrame*)data = a->frame;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
return buf_size;
}