From 97d51bf22fe92e2c891b5add774105cfbda9b132 Mon Sep 17 00:00:00 2001 From: winshining Date: Fri, 8 Mar 2024 23:07:07 +0800 Subject: [PATCH] [dev] simplified checks. --- ngx_rtmp_gop_cache_module.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/ngx_rtmp_gop_cache_module.c b/ngx_rtmp_gop_cache_module.c index 2a6d38b..2ea1786 100644 --- a/ngx_rtmp_gop_cache_module.c +++ b/ngx_rtmp_gop_cache_module.c @@ -631,16 +631,14 @@ ngx_rtmp_gop_cache_send(ngx_rtmp_session_t *s) meta = NULL; - if (cache->meta) { - if (meta_version != cache->meta_version) { - meta = handler->meta_message_pt(s, cache->meta); - if (meta == NULL) { - ngx_rtmp_finalize_session(s); - return; - } - - meta_version = cache->meta_version; + if (cache->meta && meta_version != cache->meta_version) { + meta = handler->meta_message_pt(s, cache->meta); + if (meta == NULL) { + ngx_rtmp_finalize_session(s); + return; } + + meta_version = cache->meta_version; } /* send metadata */