[vlc-commits] mediacodec: fix i_angle not initialized to 0

Thomas Guillem git at videolan.org
Mon Aug 17 17:02:58 CEST 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Aug 17 17:02:16 2015 +0200| [920f5b4d9cf11befb989cbe175adc3a669cb11f7] | committer: Thomas Guillem

mediacodec: fix i_angle not initialized to 0

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=920f5b4d9cf11befb989cbe175adc3a669cb11f7
---

 modules/codec/omxil/mediacodec.c |   27 ++++++++++++---------------
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/modules/codec/omxil/mediacodec.c b/modules/codec/omxil/mediacodec.c
index d63907b..85a8e45 100644
--- a/modules/codec/omxil/mediacodec.c
+++ b/modules/codec/omxil/mediacodec.c
@@ -357,22 +357,19 @@ static int StartMediaCodec(decoder_t *p_dec)
         args.video.i_width = p_sys->u.video.i_width;
         args.video.i_height = p_sys->u.video.i_height;
 
-        if (p_dec->fmt_in.video.orientation != ORIENT_NORMAL)
+        switch (p_dec->fmt_in.video.orientation)
         {
-            switch (p_dec->fmt_in.video.orientation)
-            {
-                case ORIENT_ROTATED_90:
-                    args.video.i_angle = 90;
-                    break;
-                case ORIENT_ROTATED_180:
-                    args.video.i_angle = 180;
-                    break;
-                case ORIENT_ROTATED_270:
-                    args.video.i_angle = 270;
-                    break;
-                default:
-                    args.video.i_angle = 0;
-            }
+            case ORIENT_ROTATED_90:
+                args.video.i_angle = 90;
+                break;
+            case ORIENT_ROTATED_180:
+                args.video.i_angle = 180;
+                break;
+            case ORIENT_ROTATED_270:
+                args.video.i_angle = 270;
+                break;
+            default:
+                args.video.i_angle = 0;
         }
 
         /* Check again the codec name if h264 profile changed */



More information about the vlc-commits mailing list