winlin

Merge branch '2.0release' into develop

@@ -2028,6 +2028,9 @@ int64_t srs_utils_send_bytes(srs_rtmp_t rtmp) @@ -2028,6 +2028,9 @@ int64_t srs_utils_send_bytes(srs_rtmp_t rtmp)
2028 { 2028 {
2029 srs_assert(rtmp != NULL); 2029 srs_assert(rtmp != NULL);
2030 Context* context = (Context*)rtmp; 2030 Context* context = (Context*)rtmp;
  2031 + if (!context->rtmp) {
  2032 + return 0;
  2033 + }
2031 return context->rtmp->get_send_bytes(); 2034 return context->rtmp->get_send_bytes();
2032 } 2035 }
2033 2036
@@ -2035,6 +2038,9 @@ int64_t srs_utils_recv_bytes(srs_rtmp_t rtmp) @@ -2035,6 +2038,9 @@ int64_t srs_utils_recv_bytes(srs_rtmp_t rtmp)
2035 { 2038 {
2036 srs_assert(rtmp != NULL); 2039 srs_assert(rtmp != NULL);
2037 Context* context = (Context*)rtmp; 2040 Context* context = (Context*)rtmp;
  2041 + if (!context->rtmp) {
  2042 + return 0;
  2043 + }
2038 return context->rtmp->get_recv_bytes(); 2044 return context->rtmp->get_recv_bytes();
2039 } 2045 }
2040 2046