]> git.sesse.net Git - vlc/commitdiff
livehttp: Fix crash on when not using encryption
authorIlkka Ollakka <ileoo@videolan.org>
Mon, 18 Mar 2013 07:05:35 +0000 (09:05 +0200)
committerIlkka Ollakka <ileoo@videolan.org>
Mon, 18 Mar 2013 07:06:44 +0000 (09:06 +0200)
Call CryptKey only if we actually are encrypting stuff

Fixes: #8315
modules/access_output/livehttp.c

index cf5d6d7a627eed8295448953173acc55e5a1996a..ebb6b3ab49eb4e117048cd2e9fd8114fe95a9de0 100644 (file)
@@ -673,7 +673,8 @@ static ssize_t openNextFile( sout_access_out_t *p_access, sout_access_out_sys_t
         return -1;
     }
 
-    CryptKey( p_access, i_newseg );
+    if( p_sys->key_uri )
+        CryptKey( p_access, i_newseg );
     msg_Dbg( p_access, "Successfully opened livehttp file: %s (%"PRIu32")" , psz_seg, i_newseg );
 
     //free( psz_seg );