Skip to content

Fix writer to skip packets with an empty payload #635

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

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

bhbs
Copy link
Contributor

@bhbs bhbs commented Nov 20, 2024

Fixes #634

References

Similar implementation in webrtc-rs/webrtc

if packet.payload.is_empty() {
return Ok(());
}

Related PR in pion/webrtc

Test

  1. Open https://jsfiddle.net/vfmcg8rk/1/
  2. Copy SDP
  3. cargo build --example save-to-disk-h264
  4. echo $BROWSER_SDP | ./target/debug/examples/save-to-disk-h264 --video ./output.h264 --audio ./output.ogg
  5. Start session

-> OggWriter and IvfWriter works continuously

Copy link
Member

@rainliu rainliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you fix failed tests?

@bhbs
Copy link
Contributor Author

bhbs commented Nov 20, 2024

I’ve fixed the test! Please take a look 👍

@bhbs bhbs requested a review from rainliu November 20, 2024 02:02
@rainliu rainliu merged commit fc3a0aa into webrtc-rs:master Nov 20, 2024
5 checks passed
tubzby pushed a commit to tubzby/webrtc-rs that referenced this pull request Nov 26, 2024
* Fix writer to skip packets with an empty payload

* Fix writer tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OggWriter and IvfWriter halt due to empty payload packets
2 participants