# HG changeset patch # User reimar # Date 1367738853 0 # Node ID 3c1595fcf00407c543b88726be2bc5c73123580b # Parent 1cfb48d5243f4b8b42befa7fb3716d12c454d45e Update calculation of allocation size for direct rendering. diff -r 1cfb48d5243f -r 3c1595fcf004 libmpcodecs/vd_ffmpeg.c --- a/libmpcodecs/vd_ffmpeg.c Sun May 05 07:27:32 2013 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Sun May 05 07:27:33 2013 +0000 @@ -552,8 +552,8 @@ mp_image_t *mpi=NULL; int flags= MP_IMGFLAG_ACCEPT_ALIGNED_STRIDE | MP_IMGFLAG_PREFER_ALIGNED_STRIDE; int type= MP_IMGTYPE_IPB; - int width= avctx->width; - int height= avctx->height; + int width = FFMAX(avctx->width, -(-avctx->coded_width >> avctx->lowres)); + int height= FFMAX(avctx->height, -(-avctx->coded_height >> avctx->lowres)); // special case to handle reget_buffer if (pic->opaque && pic->data[0] && (!pic->buffer_hints || pic->buffer_hints & FF_BUFFER_HINTS_REUSABLE)) return 0;