-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
srt publish core dump bug #2429
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2429 +/- ##
========================================
Coverage 42.77% 42.77%
========================================
Files 101 101
Lines 35944 35944
========================================
Hits 15376 15376
Misses 20568 20568 Continue to review full report at Codecov.
Translated to English:
|
trunk/src/srt/srt_to_rtmp.cpp
Outdated
@@ -284,12 +284,14 @@ srs_error_t rtmp_client::connect() { | |||
_rtmp_conn_ptr = std::make_shared<SrsSimpleRtmpClient>(_url, cto, sto); | |||
|
|||
if ((err = _rtmp_conn_ptr->connect()) != srs_success) { | |||
srs_error("rtmp client in srt2rtmp connect fail url:%s", _url.c_str()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this print statement for debugging purposes? It might be better to print it in the outer layer, because here err is returned, and there might be duplicate logging outside as well.
If you need the information of _url, it is already included when wrapping err.
TRANS_BY_GPT3
trunk/src/srt/srt_to_rtmp.cpp
Outdated
@@ -406,13 +408,18 @@ srs_error_t rtmp_client::rtmp_write_packet(char type, uint32_t timestamp, char* | |||
srs_error_t err = srs_success; | |||
SrsSharedPtrMessage* msg = NULL; | |||
|
|||
if (!_rtmp_conn_ptr) { | |||
return srs_error_wrap(err, "rtmp connection is close"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this time, when err is success, wrap(success) will cause the code outside to be success, which is incorrect.
Here, the error should be created using srs_error_new.
TRANS_BY_GPT3
* solve srt push bugs Co-authored-by: shiwei <shiwei05@kuaishou.com>
solve the core dump bug when srt publish.
Thanks Eric a lot for help to provide the machine.