lavc/mediacodec: use ternary operator to set slice-height value

This commit is contained in:
Matthieu Bouron 2016-03-28 10:10:21 +02:00
parent 8f2a1990c0
commit 308d3ed5aa
1 changed files with 1 additions and 5 deletions

View 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);