Skip to content
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

Merged
merged 5 commits into from
Jun 24, 2021
Merged

srt publish core dump bug #2429

merged 5 commits into from
Jun 24, 2021

Conversation

runner365
Copy link
Contributor

solve the core dump bug when srt publish.
Thanks Eric a lot for help to provide the machine.

@codecov-commenter
Copy link

codecov-commenter commented Jun 23, 2021

Codecov Report

Merging #2429 (657c6b4) into develop (a594678) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data'

Translated to English:

Δ = absolute <relative> (impact), ø = not affected, ? = missing data'
Powered by Codecov. Last update a594678...657c6b4. Read the comment docs.

TRANS_BY_GPT3

@@ -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());
Copy link
Member

@winlinvip winlinvip Jun 23, 2021

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

@@ -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");
Copy link
Member

@winlinvip winlinvip Jun 23, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TransByAI Translated by AI/GPT.
Projects
None yet
3 participants