diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 47a58f74b47c1b512b3c73c037b0ea897fa1cf85..afc9c51c0a45d3b62b310d036e553ef8b5f84ea0 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -800,7 +800,7 @@ void ff_MPV_frame_end(MpegEncContext *s);
 int ff_MPV_encode_init(AVCodecContext *avctx);
 int ff_MPV_encode_end(AVCodecContext *avctx);
 int ff_MPV_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
-                          AVFrame *frame, int *got_packet);
+                          const AVFrame *frame, int *got_packet);
 void ff_dct_encode_init_x86(MpegEncContext *s);
 void ff_MPV_common_init_x86(MpegEncContext *s);
 void ff_MPV_common_init_axp(MpegEncContext *s);
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index fa695ad20b962badbbff608d720f0b40fb6e1fcd..54ef15f5e7aa03509a05a540bf55f5aa00b693e9 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1603,7 +1603,7 @@ static int frame_start(MpegEncContext *s)
 }
 
 int ff_MPV_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
-                          AVFrame *pic_arg, int *got_packet)
+                          const AVFrame *pic_arg, int *got_packet)
 {
     MpegEncContext *s = avctx->priv_data;
     int i, stuffing_count, ret;