pion / mediadevices

Go implementation of the MediaDevices API.
https://pion.ly/
MIT License
528 stars 121 forks source link

Fixing Stride Handling for OpenH264 #381

Closed adamroach closed 2 years ago

adamroach commented 2 years ago

The golang image.YCbCr struct can contain fields of arbitrary stride lengths, which don't necessarily match the field widths. This patch passes the stride values from the image.YCbCr struct into the OpenH264 encode calls.

codecov[bot] commented 2 years ago

Codecov Report

Merging #381 (6d04eb9) into master (e316b30) will increase coverage by 0.02%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #381      +/-   ##
==========================================
+ Coverage   46.39%   46.42%   +0.02%     
==========================================
  Files          67       67              
  Lines        4371     4373       +2     
==========================================
+ Hits         2028     2030       +2     
  Misses       2220     2220              
  Partials      123      123              
Impacted Files Coverage Δ
pkg/codec/openh264/openh264.go 73.33% <100.00%> (+0.91%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e316b30...6d04eb9. Read the comment docs.

Sean-Der commented 2 years ago

Thanks @adamroach ! LGTM, I am not intimately familiar with the code base so adding @at-wat just in case.

Happy to merge in a day or two otherwise :)