[vlc-commits] codec:aom: code cleaning

Steve Lhomme git at videolan.org
Wed Jul 12 12:23:20 CEST 2017


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Mon Jul 10 16:06:26 2017 +0200| [7f141e7d13343f4f10c1bc17f9aa0b7fc09c0c26] | committer: Jean-Baptiste Kempf

codec:aom: code cleaning

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/codec/aom.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/modules/codec/aom.c b/modules/codec/aom.c
index aa3a5b8ef1..64a378816c 100644
--- a/modules/codec/aom.c
+++ b/modules/codec/aom.c
@@ -251,15 +251,11 @@ static int OpenDecoder(vlc_object_t *p_this)
     const aom_codec_iface_t *iface;
     int av_version;
 
-    switch (dec->fmt_in.i_codec)
-    {
-    case VLC_CODEC_AV1:
-        iface = &aom_codec_av1_dx_algo;
-        av_version = 1;
-        break;
-    default:
+    if (dec->fmt_in.i_codec != VLC_CODEC_AV1)
         return VLC_EGENERIC;
-    }
+
+    iface = &aom_codec_av1_dx_algo;
+    av_version = 1;
 
     decoder_sys_t *sys = malloc(sizeof(*sys));
     if (!sys)



More information about the vlc-commits mailing list