[FFmpeg-cvslog] avcodec/utils: Merge identical if conditions

Michael Niedermayer git at videolan.org
Fri Feb 26 20:20:12 CET 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Feb 26 12:59:38 2016 +0100| [410f717ff64482503908cbe5645e0f633a162cd2] | committer: Michael Niedermayer

avcodec/utils: Merge identical if conditions

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=410f717ff64482503908cbe5645e0f633a162cd2
---

 libavcodec/utils.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index af21cdd..90ece2f 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));



More information about the ffmpeg-cvslog mailing list