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

@winlinvip winlinvip force-pushed the develop branch 2 times, most recently from 55dce2c to bc381a0 Compare December 31, 2022 04:40
@winlinvip winlinvip force-pushed the develop branch 3 times, most recently from 4ae67f1 to badf33c Compare January 10, 2023 14:08
@winlinvip winlinvip force-pushed the develop branch 2 times, most recently from 500d8fc to 498ce72 Compare January 11, 2023 02:57
@winlinvip winlinvip force-pushed the develop branch 3 times, most recently from c056094 to 2ac9eb8 Compare March 23, 2023 06:02
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 29, 2023
@winlinvip winlinvip force-pushed the develop branch 2 times, most recently from 0bb9637 to 2e211f6 Compare August 12, 2024 10:42
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.

4 participants