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

fix / revert to old webrtc sample format (duration instead of packettimestamp) #162

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

cedricve
Copy link
Member

@cedricve cedricve commented Feb 5, 2025

Description

Pull Request Description: fix / revert to old webrtc sample format (duration instead of packettimestamp)

Motivation

The recent updates to the WebRTC sample format, which included the use of PacketTimestamp instead of Duration, have introduced compatibility issues and unexpected behavior in our media streaming functionality. This pull request aims to revert to the previous sample format using Duration, ensuring stability and consistency in our WebRTC implementation.

Changes

  1. Revert PacketTimestamp to Duration:

    • Updated the calculation and assignment of bufferDuration for both video and audio packets.
    • Replaced the usage of PacketTimestamp with Duration in the pionMedia.Sample struct.
  2. Code Cleanup:

    • Uncommented and restored previously commented-out code segments that handled duration calculations.
    • Removed the commented-out PacketTimestamp related code for clarity.

Why This Improves the Project

  • Compatibility: Reverting to the old sample format ensures backward compatibility with existing systems and clients that rely on the Duration field.
  • Stability: The previous implementation using Duration has been tested and proven to work reliably. This change minimizes the risk of introducing new bugs related to timestamp handling.
  • Consistency: Maintaining a consistent sample format across the project simplifies debugging and future development efforts.

By reverting to the old WebRTC sample format, we ensure a more stable and reliable media streaming experience for our users.

@cedricve cedricve merged commit 53a52b3 into master Feb 5, 2025
10 checks passed
@cedricve cedricve deleted the fix/webrtc-sample-duration branch February 5, 2025 19:54
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.

1 participant