Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow double close of codecs #364

Merged
merged 2 commits into from
Nov 21, 2021
Merged

Allow double close of codecs #364

merged 2 commits into from
Nov 21, 2021

Conversation

at-wat
Copy link
Member

@at-wat at-wat commented Nov 20, 2021

Video/AudioTrack.NewRTPReader() internally closes encoder on error.
It caused double free if user closes reader after error.

@at-wat at-wat self-assigned this Nov 20, 2021
Video/AudioTrack.NewRTPReader() internally closes encoder on error.
It caused double free if user closes reader after error.
@at-wat at-wat force-pushed the pkg/codec/allow-double-close branch from 09be628 to 184daed Compare November 20, 2021 03:47
@codecov
Copy link

codecov bot commented Nov 20, 2021

Codecov Report

Merging #364 (b84cced) into master (1f313a9) will increase coverage by 0.11%.
The diff coverage is 60.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #364      +/-   ##
==========================================
+ Coverage   46.30%   46.41%   +0.11%     
==========================================
  Files          67       67              
  Lines        4354     4369      +15     
==========================================
+ Hits         2016     2028      +12     
- Misses       2214     2218       +4     
+ Partials      124      123       -1     
Impacted Files Coverage Δ
pkg/codec/vaapi/vp8.go 0.00% <0.00%> (ø)
pkg/codec/vaapi/vp9.go 0.00% <0.00%> (ø)
pkg/codec/openh264/openh264.go 72.41% <100.00%> (+1.50%) ⬆️
pkg/codec/opus/opus.go 62.79% <100.00%> (+1.34%) ⬆️
pkg/codec/vpx/vpx.go 81.91% <100.00%> (+0.29%) ⬆️
pkg/codec/x264/x264.go 64.70% <0.00%> (+3.52%) ⬆️

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 1f313a9...b84cced. Read the comment docs.

@at-wat at-wat changed the title pkg/codec: allow double Close() Allow double close of codecs Nov 20, 2021
@at-wat at-wat merged commit a88c2da into master Nov 21, 2021
@at-wat at-wat deleted the pkg/codec/allow-double-close branch November 21, 2021 13:57
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant