From 5507823b9d950fe095c0b4047fa0ee7eff27a00c Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Mon, 6 Jan 2014 02:06:14 +0400 Subject: [PATCH] fixed crash in hls --- hls/ngx_rtmp_hls_module.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hls/ngx_rtmp_hls_module.c b/hls/ngx_rtmp_hls_module.c index fd070c4..572b517 100644 --- a/hls/ngx_rtmp_hls_module.c +++ b/hls/ngx_rtmp_hls_module.c @@ -1800,7 +1800,8 @@ ngx_rtmp_hls_video(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h, */ b = ctx->aframe; - boundary = frame.key && (codec_ctx->aac_header == NULL || b->last > b->pos); + boundary = frame.key && (codec_ctx->aac_header == NULL || + (b && b->last > b->pos)); ngx_rtmp_hls_update_fragment(s, frame.dts, boundary, 1);