From 9572920af06cf50de76b25060948cac322458f9e Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Mon, 16 Jan 2012 11:03:27 +0000 Subject: [PATCH] Fixed handling of mp4 above 2G and 32bit offsets (ticket #84). --- src/http/modules/ngx_http_mp4_module.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/http/modules/ngx_http_mp4_module.c b/src/http/modules/ngx_http_mp4_module.c index 7bfb3db66..6de7c8fea 100644 --- a/src/http/modules/ngx_http_mp4_module.c +++ b/src/http/modules/ngx_http_mp4_module.c @@ -165,10 +165,10 @@ typedef struct { ((u_char *) (p))[7] = n4 #define ngx_mp4_get_32value(p) \ - ( (((u_char *) (p))[0] << 24) \ - + (((u_char *) (p))[1] << 16) \ - + (((u_char *) (p))[2] << 8) \ - + (((u_char *) (p))[3]) ) + ( ((uint32_t) ((u_char *) (p))[0] << 24) \ + + ( ((u_char *) (p))[1] << 16) \ + + ( ((u_char *) (p))[2] << 8) \ + + ( ((u_char *) (p))[3]) ) #define ngx_mp4_set_32value(p, n) \ ((u_char *) (p))[0] = (u_char) ((n) >> 24); \