Klaus Demo nginx / ff8c2ae
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). Maxim Dounin 8 years ago
1 changed file(s) with 6 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
164164 ((u_char *) (p))[7] = n4
165165
166166 #define ngx_mp4_get_32value(p) \
167 ( (((u_char *) (p))[0] << 24) \
168 + (((u_char *) (p))[1] << 16) \
169 + (((u_char *) (p))[2] << 8) \
170 + (((u_char *) (p))[3]) )
167 ( ((uint32_t) ((u_char *) (p))[0] << 24) \
168 + ( ((u_char *) (p))[1] << 16) \
169 + ( ((u_char *) (p))[2] << 8) \
170 + ( ((u_char *) (p))[3]) )
171171
172172 #define ngx_mp4_set_32value(p, n) \
173173 ((u_char *) (p))[0] = (u_char) ((n) >> 24); \
23812381 data->pos = (u_char *) entry;
23822382 atom_size = sizeof(ngx_mp4_stsc_atom_t) + (data->last - data->pos);
23832383
2384 ngx_mp4_set_32value(entry->chunk, 1);
2385
23842386 if (trak->chunk_samples) {
23852387
23862388 first = &trak->stsc_chunk_entry;