diff options
author | Matthieu Bouron <matthieu.bouron@stupeflix.com> | 2016-03-28 10:10:21 +0200 |
---|---|---|
committer | Matthieu Bouron <matthieu.bouron@stupeflix.com> | 2016-03-28 10:10:21 +0200 |
commit | 308d3ed5aa3a7bb61b1e417bfd6801136c955b39 (patch) | |
tree | 600bcba64dd949115fe240aebdb1143b5024caa4 | |
parent | 8f2a1990c06df73cf58401c8ba193711eb8947e7 (diff) | |
download | ffmpeg-308d3ed5aa3a7bb61b1e417bfd6801136c955b39.tar.gz |
lavc/mediacodec: use ternary operator to set slice-height value
-rw-r--r-- | libavcodec/mediacodecdec.c | 6 |
1 files changed, 1 insertions, 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); |