diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index f39cdca3da..f34c81dd0f 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1540,6 +1540,10 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) return i; } s->last_picture_ptr = &s->picture[i]; + + s->last_picture_ptr->reference = 3; + s->last_picture_ptr->f.pict_type = AV_PICTURE_TYPE_I; + if (ff_alloc_picture(s, s->last_picture_ptr, 0) < 0) { s->last_picture_ptr = NULL; return -1; @@ -1567,6 +1571,10 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) return i; } s->next_picture_ptr = &s->picture[i]; + + s->next_picture_ptr->reference = 3; + s->next_picture_ptr->f.pict_type = AV_PICTURE_TYPE_I; + if (ff_alloc_picture(s, s->next_picture_ptr, 0) < 0) { s->next_picture_ptr = NULL; return -1;