[nginx] svn commit: r4403 - trunk/src/http/modules

mdounin at mdounin.ru mdounin at mdounin.ru
Mon Jan 16 11:03:28 UTC 2012


Author: mdounin
Date: 2012-01-16 11:03:27 +0000 (Mon, 16 Jan 2012)
New Revision: 4403

Log:
Fixed handling of mp4 above 2G and 32bit offsets (ticket #84).


Modified:
   trunk/src/http/modules/ngx_http_mp4_module.c

Modified: trunk/src/http/modules/ngx_http_mp4_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_mp4_module.c	2012-01-16 11:01:52 UTC (rev 4402)
+++ trunk/src/http/modules/ngx_http_mp4_module.c	2012-01-16 11:03:27 UTC (rev 4403)
@@ -165,10 +165,10 @@
     ((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);                               \



More information about the nginx-devel mailing list