Commit 410f717f authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/utils: Merge identical if conditions

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent bc7beb65
......@@ -864,8 +864,7 @@ static int get_buffer_internal(AVCodecContext *avctx, AVFrame *frame, int flags)
av_log(avctx, AV_LOG_ERROR, "video_get_buffer: image parameters invalid\n");
return AVERROR(EINVAL);
}
}
if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) {
if (frame->width <= 0 || frame->height <= 0) {
frame->width = FFMAX(avctx->width, AV_CEIL_RSHIFT(avctx->coded_width, avctx->lowres));
frame->height = FFMAX(avctx->height, AV_CEIL_RSHIFT(avctx->coded_height, avctx->lowres));
......
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