comparison src/http/modules/ngx_http_mp4_module.c @ 5544:2f586f1684fa

Mp4: fix seeks to standalone last chunk. If seek position is within the last track chunk and that chunk is standalone (stsc entry describes only this chunk) such seek generates stsc seek error. The problem is that chunk numbers start with 1, not with 0.
author Roman Arutyunyan <arut@nginx.com>
date Wed, 29 Jan 2014 13:44:15 +0400
parents 5730c0193842
children e280ece17020
comparison
equal deleted inserted replaced
5543:5730c0193842 5544:2f586f1684fa
2492 id = ngx_mp4_get_32value(entry->id); 2492 id = ngx_mp4_get_32value(entry->id);
2493 entries--; 2493 entries--;
2494 entry++; 2494 entry++;
2495 } 2495 }
2496 2496
2497 next_chunk = trak->chunks; 2497 next_chunk = trak->chunks + 1;
2498 2498
2499 ngx_log_debug4(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, 2499 ngx_log_debug4(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0,
2500 "start_sample:%uD, chunk:%uD, chunks:%uD, samples:%uD", 2500 "start_sample:%uD, chunk:%uD, chunks:%uD, samples:%uD",
2501 start_sample, chunk, next_chunk - chunk, samples); 2501 start_sample, chunk, next_chunk - chunk, samples);
2502 2502