diff --git a/hls/ngx_rtmp_mpegts.c b/hls/ngx_rtmp_mpegts.c index bd5d8cc..ab5c261 100644 --- a/hls/ngx_rtmp_mpegts.c +++ b/hls/ngx_rtmp_mpegts.c @@ -290,7 +290,15 @@ ngx_rtmp_mpegts_init_encryption(ngx_rtmp_mpegts_file_t *file, } ngx_memzero(file->iv, 8); - ngx_memcpy(file->iv + 8, &iv, 8); + + file->iv[8] = iv >> 56; + file->iv[9] = iv >> 48; + file->iv[10] = iv >> 40; + file->iv[11] = iv >> 32; + file->iv[12] = iv >> 24; + file->iv[13] = iv >> 16; + file->iv[14] = iv >> 8; + file->iv[15] = iv; file->encrypt = 1;