Ticket #72: patch-nginx-mp4.txt

File patch-nginx-mp4.txt, 828 bytes (added by Maxim Dounin, 15 years ago)
Line 
1# HG changeset patch
2# User Maxim Dounin <mdounin@mdounin.ru>
3# Date 1324636009 -10800
4# Node ID 1d216a4c80c4b4f324c147887f0c45a36156d09f
5# Parent 317692c5ce9afc2c810ae974392fb64f2d02113e
6Fixed mp4 if first entry in stsc was skipped (ticket #72).
7
8If first entry in stsc atom was skipped, and seek was to chunk boundary,
9than first_chunk in the generated stsc table wasn't set to 1.
10
11diff --git a/src/http/modules/ngx_http_mp4_module.c b/src/http/modules/ngx_http_mp4_module.c
12--- a/src/http/modules/ngx_http_mp4_module.c
13+++ b/src/http/modules/ngx_http_mp4_module.c
14@@ -2382,6 +2382,8 @@ found:
15 data->pos = (u_char *) entry;
16 atom_size = sizeof(ngx_mp4_stsc_atom_t) + (data->last - data->pos);
17
18+ ngx_mp4_set_32value(entry->chunk, 1);
19+
20 if (trak->chunk_samples) {
21
22 first = &trak->stsc_chunk_entry;