]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/utils: Merge identical if conditions
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 26 Feb 2016 11:59:38 +0000 (12:59 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 26 Feb 2016 19:12:30 +0000 (20:12 +0100)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/utils.c

index af21cdd95f8e3bfb29f4f5b0c40fef5ceb71d1bf..90ece2f343bbf693628620cbec10d95e4598a4ba 100644 (file)
@@ -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));