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

SRS has crashed before first keyframe arriving on rtc2rtmp. #3078

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

anjisuan783
Copy link

@anjisuan783 anjisuan783 commented Jun 23, 2022

#3034

  1. It can be seen from SrsRtmpFromRtcBridger::packet_video_rtmp (this=0x10ddc420, start=0, end=22704) that there is a fault, under normal circumstances it is not possible to have so many packet losses (distance(0, 22704));
  2. Continuing to look at header_sn_=0, rtp_key_frame_ts_=-1, it is speculated that no key_frame has been received, which can be proven from the logs, filtering condition ContextId=q38p5iuu);
  3. It can be inferred that lost_sn_ has not been initialized (random value 22705), coincidentally pkt->header.get_sequence is also 22705, and the program can reach line 1451 in srs_app_rtc_source.cpp.
    In the end, it crashes.
    Conclusion: The tragedy caused by lost_sn_ not being initialized.
    The starting sequence of webrtc is a random value, as long as the first frame is not a key_frame, the sequence within a GOP can increase to lost_sn_, which will cause a crash.

TRANS_BY_GPT3

@codecov-commenter

This comment was marked as outdated.

@winlinvip winlinvip force-pushed the develop branch 3 times, most recently from 14b8d86 to 4126c42 Compare August 14, 2022 23:57
@winlinvip winlinvip force-pushed the develop branch 11 times, most recently from 9c7a9d0 to 38c3d9f Compare September 2, 2022 14:22
@winlinvip winlinvip force-pushed the develop branch 2 times, most recently from 991fdb5 to 02d47c5 Compare November 23, 2022 03:57
@shenleilei
Copy link

shenleilei commented Nov 25, 2022

I didn't understand. I just assigned a value to lost_sn. Why does this solve the problem? Isn't it still possible for the sequence number of the RTP packet to increment to lost_sn?

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
Development

Successfully merging this pull request may close these issues.

None yet

4 participants