From 8a96e7942a6a2576fcfa1ecf91450a254fb93c99 Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Mon, 5 Nov 2012 10:04:18 +0400 Subject: [PATCH] fixed chunk count test in mp4 parser --- ngx_rtmp_mp4_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ngx_rtmp_mp4_module.c b/ngx_rtmp_mp4_module.c index fbb2661..ba679ff 100644 --- a/ngx_rtmp_mp4_module.c +++ b/ngx_rtmp_mp4_module.c @@ -880,7 +880,7 @@ ngx_rtmp_mp4_parse_stsc(ngx_rtmp_session_t *s, u_char *pos, u_char *last) t->chunks = (ngx_rtmp_mp4_chunks_t *) pos; - if (pos + sizeof(*t->chunks) + ngx_rtmp_r32(t->times->entry_count) * + if (pos + sizeof(*t->chunks) + ngx_rtmp_r32(t->chunks->entry_count) * sizeof(t->chunks->entries[0]) <= last) {