[vlc-commits] chromecast: Minor simplification

Hugo Beauzée-Luyssen git at videolan.org
Thu Feb 16 09:54:12 CET 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Feb 15 15:14:05 2017 +0100| [329708673eac8635828b0ab6fb217d592e153e0c] | committer: Hugo Beauzée-Luyssen

chromecast: Minor simplification

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

 modules/stream_out/chromecast/cast.cpp | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index 4e71482..12b2051 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -198,23 +198,19 @@ static void Del(sout_stream_t *p_stream, sout_stream_id_sys_t *id)
 
 bool sout_stream_sys_t::canDecodeVideo( int i_codec ) const
 {
-    if (i_codec == VLC_CODEC_H264 || i_codec == VLC_CODEC_VP8)
-        return true;
-    return false;
+    return i_codec == VLC_CODEC_H264 || i_codec == VLC_CODEC_VP8;
 }
 
 bool sout_stream_sys_t::canDecodeAudio( int i_codec ) const
 {
-    if (i_codec == VLC_CODEC_VORBIS ||
+    return i_codec == VLC_CODEC_VORBIS ||
         i_codec == VLC_CODEC_MP4A ||
         i_codec == VLC_FOURCC('h', 'a', 'a', 'c') ||
         i_codec == VLC_FOURCC('l', 'a', 'a', 'c') ||
         i_codec == VLC_FOURCC('s', 'a', 'a', 'c') ||
         i_codec == VLC_CODEC_MP3 ||
         i_codec == VLC_CODEC_A52 ||
-        i_codec == VLC_CODEC_EAC3)
-        return true;
-    return false;
+        i_codec == VLC_CODEC_EAC3;
 }
 
 int sout_stream_sys_t::UpdateOutput( sout_stream_t *p_stream )



More information about the vlc-commits mailing list