Commit 79bb067a authored by Georgi Chorbadzhiyski's avatar Georgi Chorbadzhiyski Committed by Jean-Baptiste Kempf

mux/ts: Fix setting of even CSA key.

Without this fix the second CSA key can not be set, which results
in a stream that is impossible to decrypt.

Tested with:
  cvlc \
    -I dummy -vv \
    --sout '#standard{access=udp,mux=ts,dst=239.78.78.78:5000}' \
    --sout-ts-crypt-audio --no-sout-ts-crypt-video \
    --sout-ts-csa-ck=1111111111111111 \
    --sout-ts-csa2-ck=0000000000000000 \
    http://example.com/source.ts

Before the patch:
  mux_ts mux debug: using CSA (de)scrambling with odd key=11:11:11:11:11:11:11:11
  mux_ts mux debug: no CSA found
  mux_ts mux debug: no CSA found

After the patch:
  mux_ts mux debug: using CSA (de)scrambling with odd key=11:11:11:11:11:11:11:11
  mux_ts mux debug: using CSA (de)scrambling with even key=0:0:0:0:0:0:0:0
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 3273505a
...@@ -464,6 +464,7 @@ static csa_t *csaSetup( vlc_object_t *p_this ) ...@@ -464,6 +464,7 @@ static csa_t *csaSetup( vlc_object_t *p_this )
vlc_mutex_init( &p_sys->csa_lock ); vlc_mutex_init( &p_sys->csa_lock );
p_sys->b_crypt_audio = var_GetBool( p_mux, SOUT_CFG_PREFIX "crypt-audio" ); p_sys->b_crypt_audio = var_GetBool( p_mux, SOUT_CFG_PREFIX "crypt-audio" );
p_sys->b_crypt_video = var_GetBool( p_mux, SOUT_CFG_PREFIX "crypt-video" ); p_sys->b_crypt_video = var_GetBool( p_mux, SOUT_CFG_PREFIX "crypt-video" );
p_sys->csa = csa;
char *csa2ck = var_CreateGetNonEmptyStringCommand( p_mux, SOUT_CFG_PREFIX "csa2-ck"); char *csa2ck = var_CreateGetNonEmptyStringCommand( p_mux, SOUT_CFG_PREFIX "csa2-ck");
if (!csa2ck || csa_SetCW( p_this, p_sys->csa, csa2ck, false ) ) if (!csa2ck || csa_SetCW( p_this, p_sys->csa, csa2ck, false ) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment