正在显示
1 个修改的文件
包含
6 行增加
和
0 行删除
@@ -2002,6 +2002,9 @@ int64_t srs_utils_send_bytes(srs_rtmp_t rtmp) | @@ -2002,6 +2002,9 @@ int64_t srs_utils_send_bytes(srs_rtmp_t rtmp) | ||
2002 | { | 2002 | { |
2003 | srs_assert(rtmp != NULL); | 2003 | srs_assert(rtmp != NULL); |
2004 | Context* context = (Context*)rtmp; | 2004 | Context* context = (Context*)rtmp; |
2005 | + if (!context->rtmp) { | ||
2006 | + return 0; | ||
2007 | + } | ||
2005 | return context->rtmp->get_send_bytes(); | 2008 | return context->rtmp->get_send_bytes(); |
2006 | } | 2009 | } |
2007 | 2010 | ||
@@ -2009,6 +2012,9 @@ int64_t srs_utils_recv_bytes(srs_rtmp_t rtmp) | @@ -2009,6 +2012,9 @@ int64_t srs_utils_recv_bytes(srs_rtmp_t rtmp) | ||
2009 | { | 2012 | { |
2010 | srs_assert(rtmp != NULL); | 2013 | srs_assert(rtmp != NULL); |
2011 | Context* context = (Context*)rtmp; | 2014 | Context* context = (Context*)rtmp; |
2015 | + if (!context->rtmp) { | ||
2016 | + return 0; | ||
2017 | + } | ||
2012 | return context->rtmp->get_recv_bytes(); | 2018 | return context->rtmp->get_recv_bytes(); |
2013 | } | 2019 | } |
2014 | 2020 |
-
请 注册 或 登录 后发表评论