[bugfix] Mp4: fixed start time is out mp4 mdat atom.

胡聪 (hucc) hucong.c at foxmail.com
Mon Mar 27 14:57:51 UTC 2017


# HG changeset patch
# User hucongcong <hucong.c at foxmail.com>
# Date 1490619789 -28800
#      Mon Mar 27 21:03:09 2017 +0800
# Node ID 67ad0b01f77ea5590d390b4b38d71ec2c739d333
# Parent  22be63bf21edaa1b8ea916c7d8cd4e5fe4892061
Mp4: fixed start time is out mp4 mdat atom.

start time is already out mp4 mdat atom when start_offset is equal to
file_last of mdat.

diff -r 22be63bf21ed -r 67ad0b01f77e src/http/modules/ngx_http_mp4_module.c
--- a/src/http/modules/ngx_http_mp4_module.c	Fri Mar 24 18:05:06 2017 +0300
+++ b/src/http/modules/ngx_http_mp4_module.c	Mon Mar 27 21:03:09 2017 +0800
@@ -860,7 +860,7 @@ ngx_http_mp4_process(ngx_http_mp4_file_t

     *prev = &mp4->mdat_atom;

-    if (start_offset > mp4->mdat_data.buf->file_last) {
+    if (start_offset >= mp4->mdat_data.buf->file_last) {
         ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
                       "start time is out mp4 mdat atom in \"%s\"",
                       mp4->file.name.data);


More information about the nginx-devel mailing list