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

HLS: Ignore empty NALU to avoid error. v6.0.65 #3750

Merged
merged 8 commits into from Aug 2, 2023

Conversation

winlinvip
Copy link
Member

@winlinvip winlinvip commented Aug 2, 2023

For the DJI M30, there is a bug where empty NALU packets with a size of zero are causing issues with HLS streaming. This bug leads to random unpublish events due to the SRS disconnecting the connection for the HLS module when it fails to handle empty NALU packets.

To address this bug, we have patched the system to ignore any empty NALU packets with a size of zero. Additionally, we have created a tool in the srs-bench to replay pcapng files captured by tcpdump or Wireshark. We have also added utest using mprotect and asan to detect any memory corruption.

It is important to note that this bug has been fixed in versions 4.0.271 6477f31 and 5.0.170 939f6b4. This patch specifically addresses the issue in SRS 6.0.

Please be aware that there is another commit related to this bug that partially fixes the issue but still leaves a small problem for asan to detect memory corruption. This commit, 577cd29, only ignores empty NALU packets but still reads beyond the memory.


Co-authored-by: chundonglinlin chundonglinlin@163.com

@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Aug 2, 2023
@winlinvip winlinvip linked an issue Aug 2, 2023 that may be closed by this pull request
@winlinvip winlinvip added the RefinedByAI Refined by AI/GPT. label Aug 2, 2023
@winlinvip winlinvip changed the title HLS: Ignore empty NALU to avoid error. To prevent errors, the HLS protocol should disregard any empty Network Abstraction Layer Units (NALUs). v6.0.65 Aug 2, 2023
@winlinvip winlinvip changed the title To prevent errors, the HLS protocol should disregard any empty Network Abstraction Layer Units (NALUs). v6.0.65 HLS: Ignore empty NALU to avoid error. Aug 2, 2023
@winlinvip winlinvip changed the title HLS: Ignore empty NALU to avoid error. HLS: Ignore empty NALU to avoid error. v6.0.65 Aug 2, 2023
@winlinvip winlinvip changed the title HLS: Ignore empty NALU to avoid error. v6.0.65 HLS: Ignore empty NALU to avoid error. v6.0.66 Aug 2, 2023
@winlinvip winlinvip changed the title HLS: Ignore empty NALU to avoid error. v6.0.66 HLS: Ignore empty NALU to avoid error. v6.0.65 Aug 2, 2023
@winlinvip winlinvip force-pushed the bugfix/dji-empty-nalu branch 3 times, most recently from e0e885a to 2af97e6 Compare August 2, 2023 14:16
@winlinvip winlinvip merged commit 73dd8af into ossrs:develop Aug 2, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EnglishNative This issue is conveyed exclusively in English. RefinedByAI Refined by AI/GPT.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Connection keeps getting disconnected and reconnecting over and over
2 participants