Commit 05b2c998 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec: Fix lowres handling in buffer allocation

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a8b05dde
......@@ -621,8 +621,8 @@ int ff_init_buffer_info(AVCodecContext *avctx, AVFrame *frame)
switch (avctx->codec->type) {
case AVMEDIA_TYPE_VIDEO:
frame->width = FFMAX(avctx->width, avctx->coded_width);
frame->height = FFMAX(avctx->height, avctx->coded_height);
frame->width = FFMAX(avctx->width , -((-avctx->coded_width )>>avctx->lowres));
frame->height = FFMAX(avctx->height, -((-avctx->coded_height)>>avctx->lowres));
if (frame->format < 0)
frame->format = avctx->pix_fmt;
if (!frame->sample_aspect_ratio.num)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment