Skip to content

Test that Unmarshal doesn't do any allocations - #267

Merged
Sean-Der merged 1 commit into
pion:masterfrom
jech:unmarshal-alloc-test
Apr 23, 2024
Merged

Test that Unmarshal doesn't do any allocations#267
Sean-Der merged 1 commit into
pion:masterfrom
jech:unmarshal-alloc-test

Conversation

@jech

@jech jech commented Apr 15, 2024

Copy link
Copy Markdown
Member

The various Unmarshal functions are low-level functions that
should not do any extensive parsing. Anything that requires
allocations should be done in a user-callable function so that
applications can call Unmarshal without concern for efficiency.

@jech
jech force-pushed the unmarshal-alloc-test branch from a4d0e77 to 844d5d2 Compare April 15, 2024 19:39
@jech

jech commented Apr 15, 2024

Copy link
Copy Markdown
Member Author

This currently fails for H264, H265 and AV1. If either #265 or #266 gets applied, it will pass for AV1. Once that happens, I'll fix H264 and H265.

@jech
jech force-pushed the unmarshal-alloc-test branch from 844d5d2 to d7aeff5 Compare April 15, 2024 22:43
@jech

jech commented Apr 15, 2024

Copy link
Copy Markdown
Member Author

If #266 and #268 are applied, this passes for AV1 and H.264. I'm not going to fix H.265, since I'm not interested in single-platform codecs.

Assert that H264, VP8, VP9 and AV1 don't do any allocation. At this time
H265 does allocate.
@Sean-Der
Sean-Der force-pushed the unmarshal-alloc-test branch from d7aeff5 to 30cf69f Compare April 23, 2024 04:06
@Sean-Der
Sean-Der merged commit 12646b6 into pion:master Apr 23, 2024
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.

2 participants