[vlc-devel] [PATCH 20/25] codec:aom: code cleaning

Steve Lhomme robux4 at videolabs.io
Mon Jul 10 16:52:24 CEST 2017


---
 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)
-- 
2.12.1



More information about the vlc-devel mailing list