]> git.kaiwu.me - nginx.git/commitdiff
Mp4: remove useless leading stsc entry in result mp4.
authorRoman Arutyunyan <arut@nginx.com>
Fri, 14 Feb 2014 11:14:48 +0000 (15:14 +0400)
committerRoman Arutyunyan <arut@nginx.com>
Fri, 14 Feb 2014 11:14:48 +0000 (15:14 +0400)
The fix removes useless stsc entry in result mp4.
If start_sample == n then current stsc entry should be skipped
and the result stsc should start with the next entry.
The reason for that is start_sample starts from 0, not 1.

src/http/modules/ngx_http_mp4_module.c

index c29ab1ce544c18476d767a427d138a2b3cba1a40..426a0b97fb8d5cabc203b27e0d135cbed7d1ea1f 100644 (file)
@@ -2481,7 +2481,7 @@ ngx_http_mp4_update_stsc_atom(ngx_http_mp4_file_t *mp4,
 
         n = (next_chunk - chunk) * samples;
 
-        if (start_sample <= n) {
+        if (start_sample < n) {
             goto found;
         }