]> git.kaiwu.me - nginx.git/commitdiff
Mp4: fix seeks after the last key frame.
authorRoman Arutyunyan <arut@nginx.com>
Wed, 29 Jan 2014 09:30:36 +0000 (13:30 +0400)
committerRoman Arutyunyan <arut@nginx.com>
Wed, 29 Jan 2014 09:30:36 +0000 (13:30 +0400)
Mp4 module does not allow seeks after the last key frame.  Since
stss atom only contains key frames it's usually shorter than
other track atoms.  That leads to stss seek error when seek
position is close to the end of file.  The fix outputs empty
stss frame instead of generating error.

src/http/modules/ngx_http_mp4_module.c

index d900fb8d161ea8d59c36728f2786a02bdd838c95..da91fde27041722ce2011f9fcf5e0f04465ea4bc 100644 (file)
@@ -2153,11 +2153,8 @@ ngx_http_mp4_update_stss_atom(ngx_http_mp4_file_t *mp4,
         entry++;
     }
 
-    ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
-                  "start sample is out of mp4 stss atom in \"%s\"",
-                  mp4->file.name.data);
-
-    return NGX_ERROR;
+    ngx_log_debug0(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0,
+                   "start sample is out of mp4 stss atom");
 
 found: