Welcome! Log In Create A New Profile

Advanced

[nginx] Mp4: skipped empty stss atom table in output.

Sergey Kandaurov
March 24, 2014 10:00AM
details: http://hg.nginx.org/nginx/rev/a23c35496c2f
branches:
changeset: 5622:a23c35496c2f
user: Sergey Kandaurov <pluknet@nginx.com>
date: Mon Mar 24 17:55:10 2014 +0400
description:
Mp4: skipped empty stss atom table in output.

The atom may have no data entries after cropping.

This fixes "zero size buf in output" alerts.

diffstat:

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

diffs (35 lines):

diff -r 345e4fd4bb64 -r a23c35496c2f src/http/modules/ngx_http_mp4_module.c
--- a/src/http/modules/ngx_http_mp4_module.c Fri Mar 21 19:33:21 2014 +0400
+++ b/src/http/modules/ngx_http_mp4_module.c Mon Mar 24 17:55:10 2014 +0400
@@ -2273,16 +2273,21 @@ ngx_http_mp4_update_stss_atom(ngx_http_m
ngx_http_mp4_crop_stss_data(mp4, trak, 1);
ngx_http_mp4_crop_stss_data(mp4, trak, 0);

- entry = (uint32_t *) data->pos;
- end = (uint32_t *) data->last;
-
- start_sample = trak->start_sample;
-
- while (entry < end) {
- sample = ngx_mp4_get_32value(entry);
- sample -= start_sample;
- ngx_mp4_set_32value(entry, sample);
- entry++;
+ if (trak->sync_samples_entries) {
+ entry = (uint32_t *) data->pos;
+ end = (uint32_t *) data->last;
+
+ start_sample = trak->start_sample;
+
+ while (entry < end) {
+ sample = ngx_mp4_get_32value(entry);
+ sample -= start_sample;
+ ngx_mp4_set_32value(entry, sample);
+ entry++;
+ }
+
+ } else {
+ trak->out[NGX_HTTP_MP4_STSS_DATA].buf = NULL;
}

atom_size = sizeof(ngx_http_mp4_stss_atom_t) + (data->last - data->pos);

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

[nginx] Mp4: skipped empty stss atom table in output.

Sergey Kandaurov 888 March 24, 2014 10:00AM



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

Online Users

Guests: 308
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