[vlc-commits] dcp: Remove unrequired checks

Hugo Beauzée-Luyssen git at videolan.org
Fri Dec 22 10:50:47 CET 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Dec 22 10:35:29 2017 +0100| [f9e30b38f077a7cfbcfb87bf4f78934d4cdbdbd3] | committer: Hugo Beauzée-Luyssen

dcp: Remove unrequired checks

CID #1463257 #1463249

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

 modules/access/dcp/dcp.cpp | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/modules/access/dcp/dcp.cpp b/modules/access/dcp/dcp.cpp
index 2201f119d1..9920e7ff85 100644
--- a/modules/access/dcp/dcp.cpp
+++ b/modules/access/dcp/dcp.cpp
@@ -638,10 +638,8 @@ static int Demux( demux_t *p_demux )
     /* video frame */
 
     /* initialize AES context, if reel is encrypted */
-    if( p_sys &&
-            p_sys->p_dcp &&
-            p_sys->p_dcp->video_reels.size() > p_sys->i_video_reel &&
-            p_sys->p_dcp->video_reels[p_sys->i_video_reel].p_key )
+    if( p_sys->p_dcp->video_reels.size() > p_sys->i_video_reel &&
+        p_sys->p_dcp->video_reels[p_sys->i_video_reel].p_key )
     {
         if( ! ASDCP_SUCCESS( video_aes_ctx.InitKey( p_sys->p_dcp->video_reels[p_sys->i_video_reel].p_key->getKey() ) ) )
         {
@@ -712,10 +710,8 @@ static int Demux( demux_t *p_demux )
         }
 
         /* initialize AES context, if reel is encrypted */
-        if( p_sys &&
-                p_sys->p_dcp &&
-                p_sys->p_dcp->audio_reels.size() > p_sys->i_audio_reel &&
-                p_sys->p_dcp->audio_reels[p_sys->i_audio_reel].p_key )
+        if( p_sys->p_dcp->audio_reels.size() > p_sys->i_audio_reel &&
+            p_sys->p_dcp->audio_reels[p_sys->i_audio_reel].p_key )
         {
             if( ! ASDCP_SUCCESS( audio_aes_ctx.InitKey( p_sys->p_dcp->audio_reels[p_sys->i_audio_reel].p_key->getKey() ) ) )
             {



More information about the vlc-commits mailing list