mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/utils: Merge identical if conditions
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
bc7beb6574
commit
410f717ff6
|
@ -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");
|
av_log(avctx, AV_LOG_ERROR, "video_get_buffer: image parameters invalid\n");
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) {
|
|
||||||
if (frame->width <= 0 || frame->height <= 0) {
|
if (frame->width <= 0 || frame->height <= 0) {
|
||||||
frame->width = FFMAX(avctx->width, AV_CEIL_RSHIFT(avctx->coded_width, avctx->lowres));
|
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));
|
frame->height = FFMAX(avctx->height, AV_CEIL_RSHIFT(avctx->coded_height, avctx->lowres));
|
||||||
|
|
Loading…
Reference in New Issue