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

Projects
None yet
2 participants
@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 some commits Feb 14, 2014

Martin Panter
Fix buffer overwriting issue when piping HDS stream
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

Merge pull request #295 from vadmium/buffer
Fix memory overwriting issue caused by buffer rework

@chrippa chrippa merged commit 8cacad5 into chrippa:develop Feb 14, 2014

1 check passed

default The Travis CI build passed
Details
@chrippa

This comment has been minimized.

Show comment
Hide comment
@chrippa

chrippa Feb 14, 2014

Owner

Thanks!

Owner

chrippa commented Feb 14, 2014

Thanks!

@vadmium vadmium deleted the vadmium:buffer branch Feb 14, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment