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 memory overwriting issue caused by buffer rework #295

Merged
merged 2 commits into from Feb 14, 2014

Conversation

vadmium
Copy link

@vadmium vadmium commented Feb 14, 2014

This fixes an issue caused by commit fe46a8e “Refactor the basic buffer” in 1.7.3, and seen when streaming HDS to a player. I also added a test case :)

Martin Panter added 2 commits February 14, 2014 01:29
The HDS module uses “memoryview” objects, which are not “bytearray” objects,
but still need copying.

Simplify by always calling bytes() without checking the type of object. With
a “bytes” object input the time taken is still independant of the size of the
buffer:

Direct bytes() call: 1.8 µs (Python 3.3) or 0.40 µs (Python 2.7)
Instance check: 0.7 µs (Python 3.3) or 0.6 µs (Python 2.7)
chrippa added a commit that referenced this pull request Feb 14, 2014
Fix memory overwriting issue caused by buffer rework
@chrippa chrippa merged commit 8cacad5 into chrippa:develop Feb 14, 2014
@chrippa
Copy link
Owner

chrippa commented Feb 14, 2014

Thanks!

@vadmium vadmium deleted the buffer branch February 14, 2014 02:09
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.

None yet

2 participants