From 308d3ed5aa3a7bb61b1e417bfd6801136c955b39 Mon Sep 17 00:00:00 2001 From: Matthieu Bouron Date: Mon, 28 Mar 2016 10:10:21 +0200 Subject: [PATCH] lavc/mediacodec: use ternary operator to set slice-height value --- libavcodec/mediacodecdec.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c index d385651fdf..5c1368ff32 100644 --- a/libavcodec/mediacodecdec.c +++ b/libavcodec/mediacodecdec.c @@ -255,11 +255,7 @@ static int mediacodec_dec_parse_format(AVCodecContext *avctx, MediaCodecDecConte av_freep(&format); return AVERROR_EXTERNAL; } - if (value > 0) { - s->slice_height = value; - } else { - s->slice_height = s->height; - } + s->slice_height = value > 0 ? value : s->height; if (strstr(s->codec_name, "OMX.Nvidia.")) { s->slice_height = FFALIGN(s->height, 16);