[vlc-commits] mux/ts: Fix setting of even CSA key.

Georgi Chorbadzhiyski git at videolan.org
Tue Apr 10 14:46:41 CEST 2012


vlc | branch: master | Georgi Chorbadzhiyski <gf at unixsol.org> | Tue Apr 10 13:21:43 2012 +0300| [79bb067aed6420edad6d15eac682d4d810d1a5fb] | committer: 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: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/mux/mpeg/ts.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
index a887095..03f452c 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -464,6 +464,7 @@ static csa_t *csaSetup( vlc_object_t *p_this )
     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_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");
     if (!csa2ck || csa_SetCW( p_this, p_sys->csa, csa2ck, false ) )



More information about the vlc-commits mailing list