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 the VPX encoder is not properly handling the frame timestamp #606

Merged
merged 3 commits into from
Feb 14, 2025

Conversation

tyohan
Copy link
Contributor

@tyohan tyohan commented Feb 12, 2025

There is an issue with VPX encoder that using time.Now().Nanosecond() / 1000000 as the timestamp marker and make the timestamp is not monotonic and there is a potential issue the frame duration become negative and make the encoding failed.

Check the new test included in this PR to reproduce the issue.

Updated:
I just saw this issue seems similar to #603 I can close this one and merge that one if needed.

@tyohan tyohan requested review from Sean-Der and at-wat February 12, 2025 13:53
Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 44.61%. Comparing base (8f916c5) to head (d96b98a).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #606      +/-   ##
==========================================
- Coverage   44.67%   44.61%   -0.06%     
==========================================
  Files          80       80              
  Lines        5498     5498              
==========================================
- Hits         2456     2453       -3     
- Misses       2875     2877       +2     
- Partials      167      168       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@at-wat at-wat left a comment

Choose a reason for hiding this comment

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

Thank you for the PR with an unit test!
Added some suggestions.

(fixed the CI error on master branch)

pkg/codec/vpx/vpx.go Outdated Show resolved Hide resolved
pkg/codec/vpx/vpx.go Outdated Show resolved Hide resolved
Co-authored-by: Atsushi Watanabe <[email protected]>
Copy link
Member

@at-wat at-wat left a comment

Choose a reason for hiding this comment

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

LGTM!

@tyohan tyohan merged commit ce9b412 into master Feb 14, 2025
7 checks passed
@tyohan tyohan deleted the fix/vpx-not-monotonic branch February 14, 2025 05:37
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.

2 participants