]> git.sesse.net Git - ffmpeg/commitdiff
lavc/mediacodec: use ternary operator to set slice-height value
authorMatthieu Bouron <matthieu.bouron@stupeflix.com>
Mon, 28 Mar 2016 08:10:21 +0000 (10:10 +0200)
committerMatthieu Bouron <matthieu.bouron@stupeflix.com>
Mon, 28 Mar 2016 08:10:21 +0000 (10:10 +0200)
libavcodec/mediacodecdec.c

index d385651fdf9ee8a7ea933c710789a8bd7e99b0fc..5c1368ff32296745896d05b92be673c2664c2456 100644 (file)
@@ -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);