summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-02-26 12:59:38 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-02-26 20:12:30 +0100
commit410f717ff64482503908cbe5645e0f633a162cd2 (patch)
treec507151d8598a3ed24e3cf2f522cd548fd02e3bb /libavcodec
parentbc7beb657499bbbebff707ff7e7e31acc562d840 (diff)
avcodec/utils: Merge identical if conditions
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/utils.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index af21cdd95f..90ece2f343 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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));