summaryrefslogtreecommitdiff
path: root/libavcodec/mjpegenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/mjpegenc.c')
-rw-r--r--libavcodec/mjpegenc.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index f68d269c03..6f6d775ca8 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -452,11 +452,10 @@ void ff_mjpeg_encode_mb(MpegEncContext *s, DCTELEM block[6][64])
// maximum over s->mjpeg_vsample[i]
#define V_MAX 2
-static int amv_encode_picture(AVCodecContext *avctx,
- unsigned char *buf, int buf_size, void *data)
-{
+static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
+ AVFrame *pic, int *got_packet)
- AVFrame* pic=data;
+{
MpegEncContext *s = avctx->priv_data;
int i;
@@ -469,7 +468,7 @@ static int amv_encode_picture(AVCodecContext *avctx,
pic->data[i] += (pic->linesize[i] * (s->mjpeg_vsample[i] * (8 * s->mb_height -((s->height/V_MAX)&7)) - 1 ));
pic->linesize[i] *= -1;
}
- return ff_MPV_encode_picture(avctx,buf, buf_size, pic);
+ return ff_MPV_encode_picture(avctx, pkt, pic, got_packet);
}
AVCodec ff_mjpeg_encoder = {
@@ -478,7 +477,7 @@ AVCodec ff_mjpeg_encoder = {
.id = CODEC_ID_MJPEG,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_MPV_encode_init,
- .encode = ff_MPV_encode_picture,
+ .encode2 = ff_MPV_encode_picture,
.close = ff_MPV_encode_end,
.pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_NONE},
.long_name= NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"),
@@ -490,7 +489,7 @@ AVCodec ff_amv_encoder = {
.id = CODEC_ID_AMV,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_MPV_encode_init,
- .encode = amv_encode_picture,
+ .encode2 = amv_encode_picture,
.close = ff_MPV_encode_end,
.pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_NONE},
.long_name = NULL_IF_CONFIG_SMALL("AMV Video"),