summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-19 21:43:15 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-19 21:49:36 +0200
commit05b2c998c7bfea642e3541787ab5dd3847e2ba81 (patch)
treee821cc4db78e2987080a0ab3805211f13fb8f752 /libavcodec
parenta8b05dde0d88a4f654fb9ab1d6b7bcb0b65f2c78 (diff)
downloadffmpeg-streaming-05b2c998c7bfea642e3541787ab5dd3847e2ba81.zip
ffmpeg-streaming-05b2c998c7bfea642e3541787ab5dd3847e2ba81.tar.gz
avcodec: Fix lowres handling in buffer allocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 0ea1b53..1733d0f 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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)
OpenPOWER on IntegriCloud