Message ID | 20171112130151.7841-1-timo@rothenpieler.org |
---|---|
State | New |
Headers | show |
diff --git a/libavcodec/decode.c b/libavcodec/decode.c index a7f1e23fc2..0a5ec6a21b 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -1491,8 +1491,8 @@ int avcodec_default_get_buffer2(AVCodecContext *avctx, AVFrame *frame, int flags if (avctx->hw_frames_ctx) { ret = av_hwframe_get_buffer(avctx->hw_frames_ctx, frame, 0); - frame->width = avctx->coded_width; - frame->height = avctx->coded_height; + frame->width = FFMIN(avctx->coded_width, frame->width); + frame->height = FFMIN(avctx->coded_height, frame->height); return ret; }