]> git.kaiwu.me - nginx.git/commitdiff
Fixed mp4 if first entry in stsc was skipped (ticket #72).
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 26 Dec 2011 10:49:03 +0000 (10:49 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 26 Dec 2011 10:49:03 +0000 (10:49 +0000)
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.

src/http/modules/ngx_http_mp4_module.c

index 3c9f88cfc5740c9c7e67d200c7a8e4ba48113de5..7bfb3db666f506763ef76f480194b57b0f169955 100644 (file)
@@ -2382,6 +2382,8 @@ found:
     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;