[FFmpeg-cvslog] lavc/mediacodec: use ternary operator to set slice-height value
Matthieu Bouron
git at videolan.org
Mon Mar 28 10:15:51 CEST 2016
ffmpeg | branch: master | Matthieu Bouron <matthieu.bouron at stupeflix.com> | Mon Mar 28 10:10:21 2016 +0200| [308d3ed5aa3a7bb61b1e417bfd6801136c955b39] | committer: Matthieu Bouron
lavc/mediacodec: use ternary operator to set slice-height value
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=308d3ed5aa3a7bb61b1e417bfd6801136c955b39
---
libavcodec/mediacodecdec.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c
index d385651..5c1368f 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);
More information about the ffmpeg-cvslog
mailing list