[vlc-commits] livehttp: fixed generated iv in index file
Christian Suloway
git at videolan.org
Fri Aug 15 20:39:27 CEST 2014
vlc/vlc-2.2 | branch: master | Christian Suloway <csuloway at globaleagleent.com> | Thu Aug 14 17:55:35 2014 -0500| [c860dabc0a629ad4699e4f61c90e92772ff15899] | committer: 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: Rafaël Carré <funman at videolan.org>
(cherry picked from commit 6d7595d821e693391417531cf3c846f2f368b831)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=c860dabc0a629ad4699e4f61c90e92772ff15899
---
modules/access_output/livehttp.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/modules/access_output/livehttp.c b/modules/access_output/livehttp.c
index acf0991..a1b6131 100644
--- a/modules/access_output/livehttp.c
+++ b/modules/access_output/livehttp.c
@@ -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 );
More information about the vlc-commits
mailing list