# HG changeset patch # User Maxim Dounin # Date 1326711807 0 # Node ID b20019ecfdccb2d2e263cb400c2da79be51f77fc # Parent d45742815c9076116d2b076ce0a0beb303041a15 Fixed handling of mp4 above 2G and 32bit offsets (ticket #84). diff --git a/src/http/modules/ngx_http_mp4_module.c b/src/http/modules/ngx_http_mp4_module.c --- 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); \