aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_mp4_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules/ngx_http_mp4_module.c')
-rw-r--r--src/http/modules/ngx_http_mp4_module.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_mp4_module.c b/src/http/modules/ngx_http_mp4_module.c
index 041ad263b..2ca059136 100644
--- a/src/http/modules/ngx_http_mp4_module.c
+++ b/src/http/modules/ngx_http_mp4_module.c
@@ -3176,7 +3176,10 @@ ngx_http_mp4_crop_stsc_data(ngx_http_mp4_file_t *mp4,
start_sample -= n;
- prev_samples = samples;
+ if (next_chunk > chunk) {
+ prev_samples = samples;
+ }
+
chunk = next_chunk;
samples = ngx_mp4_get_32value(entry->samples);
id = ngx_mp4_get_32value(entry->id);