pion / mediadevices

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

fix nil reference when a read error occur with copyFrame enabled #417

Closed EmrysMyrddin closed 2 years ago

EmrysMyrddin commented 2 years ago

Description

Fixes a nil pointer reference in the Broadcaster when using the copyFrame feature. We were trying to copy the read buffer even if an error occured

codecov[bot] commented 2 years ago

Codecov Report

Merging #417 (2151e89) into master (5e0df5e) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #417   +/-   ##
=======================================
  Coverage   47.23%   47.23%           
=======================================
  Files          67       67           
  Lines        4452     4456    +4     
=======================================
+ Hits         2103     2105    +2     
- Misses       2224     2226    +2     
  Partials      125      125           
Impacted Files Coverage Δ
pkg/io/broadcast.go 83.33% <100.00%> (+0.43%) :arrow_up:
track.go 19.93% <0.00%> (-0.13%) :arrow_down:

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 5e0df5e...2151e89. Read the comment docs.