Welcome! Log In Create A New Profile

Advanced

[nginx] Mp4: allow end values bigger than track duration.

Roman Arutyunyan
April 01, 2014 12:56PM
details: http://hg.nginx.org/nginx/rev/0c0dd1aacdf5
branches:
changeset: 5638:0c0dd1aacdf5
user: Roman Arutyunyan <arut@nginx.com>
date: Tue Apr 01 20:53:18 2014 +0400
description:
Mp4: allow end values bigger than track duration.

If start time is within the track but end time is out of it, error
"end time is out mp4 stts samples" is generated. However it's
better to ignore the error and output the track until its end.

diffstat:

src/http/modules/ngx_http_mp4_module.c | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)

diffs (30 lines):

diff -r 5a65b9d8bc2b -r 0c0dd1aacdf5 src/http/modules/ngx_http_mp4_module.c
--- a/src/http/modules/ngx_http_mp4_module.c Mon Mar 31 22:47:42 2014 +0400
+++ b/src/http/modules/ngx_http_mp4_module.c Tue Apr 01 20:53:18 2014 +0400
@@ -2154,11 +2154,21 @@ ngx_http_mp4_crop_stts_data(ngx_http_mp4
entry++;
}

- ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
- "%s time is out mp4 stts samples in \"%s\"",
- start ? "start" : "end", mp4->file.name.data);
-
- return NGX_ERROR;
+ if (start) {
+ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
+ "start time is out mp4 stts samples in \"%s\"",
+ mp4->file.name.data);
+
+ return NGX_ERROR;
+
+ } else {
+ trak->end_sample = trak->start_sample + start_sample;
+
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0,
+ "end_sample:%ui", trak->end_sample);
+
+ return NGX_OK;
+ }

found:


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Mp4: allow end values bigger than track duration.

Roman Arutyunyan 795 April 01, 2014 12:56PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 238
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready