Commit c860dabc authored by Christian Suloway's avatar Christian Suloway Committed by Jean-Baptiste Kempf

livehttp: fixed generated iv in index file

Removed extra shift when copying generated iv for output to index file tag
Signed-off-by: default avatarRafaël Carré <funman@videolan.org>
(cherry picked from commit 6d7595d821e693391417531cf3c846f2f368b831)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent f70392c3
......@@ -614,13 +614,14 @@ static int updateIndexAndDel( sout_access_out_t *p_access, sout_access_out_sys_t
psz_current_uri = strdup( segment->psz_key_uri );
if( p_sys->b_generate_iv )
{
unsigned long long iv_hi = 0, iv_lo = 0;
for( unsigned short i = 0; i < 8; i++ )
unsigned long long iv_hi = segment->aes_ivs[0];
unsigned long long iv_lo = segment->aes_ivs[8];
for( unsigned short i = 1; i < 8; i++ )
{
iv_hi |= segment->aes_ivs[i] & 0xff;
iv_hi <<= 8;
iv_lo |= segment->aes_ivs[8+i] & 0xff;
iv_hi |= segment->aes_ivs[i] & 0xff;
iv_lo <<= 8;
iv_lo |= segment->aes_ivs[8+i] & 0xff;
}
ret = fprintf( fp, "#EXT-X-KEY:METHOD=AES-128,URI=\"%s\",IV=0X%16.16llx%16.16llx\n",
segment->psz_key_uri, iv_hi, iv_lo );
......
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