summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo_enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r--libavcodec/mpegvideo_enc.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 080528376b..a2061532ae 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -941,6 +941,13 @@ static int get_intra_count(MpegEncContext *s, uint8_t *src,
return acc;
}
+static int alloc_picture(MpegEncContext *s, Picture *pic, int shared)
+{
+ return ff_alloc_picture(s->avctx, pic, &s->me, &s->sc, shared, 1,
+ s->chroma_x_shift, s->chroma_y_shift, s->out_format,
+ s->mb_stride, s->mb_height, s->b8_stride,
+ &s->linesize, &s->uvlinesize);
+}
static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
{
@@ -1007,7 +1014,7 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
if ((ret = av_frame_ref(pic->f, pic_arg)) < 0)
return ret;
}
- ret = ff_alloc_picture(s, pic, direct);
+ ret = alloc_picture(s, pic, direct);
if (ret < 0)
return ret;
@@ -1387,7 +1394,7 @@ no_output_pic:
pic = &s->picture[i];
pic->reference = s->reordered_input_picture[0]->reference;
- if (ff_alloc_picture(s, pic, 0) < 0) {
+ if (alloc_picture(s, pic, 0) < 0) {
return -1;
}