[nginx] svn commit: r4442 - in branches/stable-1.0: . src/http/modules

mdounin at mdounin.ru mdounin at mdounin.ru
Sun Feb 5 15:51:21 UTC 2012


Author: mdounin
Date: 2012-02-05 15:51:20 +0000 (Sun, 05 Feb 2012)
New Revision: 4442

Log:
Merge of r4383, r4403:

MP4 fixes:

*) Fixed mp4 if first entry in stsc was skipped (ticket #72).

   If first entry in stsc atom was skipped, and seek was to chunk
   boundary, than first_chunk in the generated stsc table wasn't
   set to 1.

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


Modified:
   branches/stable-1.0/
   branches/stable-1.0/src/http/modules/ngx_http_mp4_module.c


Property changes on: branches/stable-1.0
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk:3960-3974,3977-3987,3991-3996,3998,4000-4018,4020,4023,4025-4027,4034-4065,4073,4077,4086-4090,4094-4102,4106-4108,4113-4114,4129-4137,4143-4144,4147-4158,4177,4179,4182-4184,4186-4187,4189-4205,4207,4209-4210,4212,4217-4223,4227-4232,4235-4237,4265-4268,4270,4274-4276,4278-4280,4282-4284,4294-4295,4298,4300-4309,4313,4315,4320-4321,4326-4327,4335-4336,4338-4343,4372-4375,4377,4379,4381-4382,4400
   + /trunk:3960-3974,3977-3987,3991-3996,3998,4000-4018,4020,4023,4025-4027,4034-4065,4073,4077,4086-4090,4094-4102,4106-4108,4113-4114,4129-4137,4143-4144,4147-4158,4177,4179,4182-4184,4186-4187,4189-4205,4207,4209-4210,4212,4217-4223,4227-4232,4235-4237,4265-4268,4270,4274-4276,4278-4280,4282-4284,4294-4295,4298,4300-4309,4313,4315,4320-4321,4326-4327,4335-4336,4338-4343,4372-4375,4377,4379,4381-4383,4400,4403

Modified: branches/stable-1.0/src/http/modules/ngx_http_mp4_module.c
===================================================================
--- branches/stable-1.0/src/http/modules/ngx_http_mp4_module.c	2012-02-05 15:47:58 UTC (rev 4441)
+++ branches/stable-1.0/src/http/modules/ngx_http_mp4_module.c	2012-02-05 15:51:20 UTC (rev 4442)
@@ -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);                               \
@@ -2382,6 +2382,8 @@
     data->pos = (u_char *) entry;
     atom_size = sizeof(ngx_mp4_stsc_atom_t) + (data->last - data->pos);
 
+    ngx_mp4_set_32value(entry->chunk, 1);
+
     if (trak->chunk_samples) {
 
         first = &trak->stsc_chunk_entry;



More information about the nginx-devel mailing list