ffmpeg | branch: master | Matthieu Bouron <[email protected]> | 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);

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to