-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
FFmpeg: Handle FFmpeg extradata in dedicated class #23182
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice change! It really improves the interface and readability.
Please rebase. I hope I can review it during weekend as well. It's a very good approach architecture wise, so I see this as major improvement. |
This ensures that everything is allocated with av_malloc and freed with av_free. The padding is also handled consistently. And as a bonus it's more ergonomic than handling the raw data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks much! Let's find out if we hit some edge cases.
Description
This ensures that everything is allocated with
av_malloc
and freed withav_free
. The padding is also handled consistently. And as a bonus it's more ergonomic than handling the raw data.Things to consider for reviewers:
FFmpegExtraData
throw if allocation fails?Motivation and context
Mixing the allocation and deallocation methods is very bad, see #23080.
How has this been tested?
Only very light runtime testing so far!
What is the effect on users?
No crashes.
Types of change
Checklist: