mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-27 09:11:17 +00:00
avcodec: Fix lowres handling in buffer allocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a8b05dde0d
commit
05b2c998c7
@ -621,8 +621,8 @@ int ff_init_buffer_info(AVCodecContext *avctx, AVFrame *frame)
|
|||||||
|
|
||||||
switch (avctx->codec->type) {
|
switch (avctx->codec->type) {
|
||||||
case AVMEDIA_TYPE_VIDEO:
|
case AVMEDIA_TYPE_VIDEO:
|
||||||
frame->width = FFMAX(avctx->width, avctx->coded_width);
|
frame->width = FFMAX(avctx->width , -((-avctx->coded_width )>>avctx->lowres));
|
||||||
frame->height = FFMAX(avctx->height, avctx->coded_height);
|
frame->height = FFMAX(avctx->height, -((-avctx->coded_height)>>avctx->lowres));
|
||||||
if (frame->format < 0)
|
if (frame->format < 0)
|
||||||
frame->format = avctx->pix_fmt;
|
frame->format = avctx->pix_fmt;
|
||||||
if (!frame->sample_aspect_ratio.num)
|
if (!frame->sample_aspect_ratio.num)
|
||||||
|
Loading…
Reference in New Issue
Block a user