[vlc-commits] packetizer:dts: code cleaning

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


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

packetizer:dts: code cleaning

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

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

 modules/packetizer/dts.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/modules/packetizer/dts.c b/modules/packetizer/dts.c
index 12ec0a6708..44239847b3 100644
--- a/modules/packetizer/dts.c
+++ b/modules/packetizer/dts.c
@@ -338,13 +338,8 @@ static int Open( vlc_object_t *p_this )
     decoder_t *p_dec = (decoder_t*)p_this;
     decoder_sys_t *p_sys;
 
-    switch( p_dec->fmt_in.i_codec )
-    {
-        case VLC_CODEC_DTS:
-            break;
-        default:
-            return VLC_EGENERIC;
-    }
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_DTS )
+        return VLC_EGENERIC;
 
     /* Allocate the memory needed to store the decoder's structure */
     if( ( p_dec->p_sys = p_sys = malloc(sizeof(decoder_sys_t)) ) == NULL )



More information about the vlc-commits mailing list