mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
swscale/internal: use static_assert for enforcing offsets
Instead of sprinkling av_assert0 into random init functions. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
parent
55d5eae411
commit
10d1be2621
3 changed files with 11 additions and 6 deletions
|
|
@ -1228,8 +1228,6 @@ SwsContext *sws_alloc_context(void)
|
|||
{
|
||||
SwsInternal *c = av_mallocz(sizeof(SwsInternal));
|
||||
|
||||
av_assert0(offsetof(SwsInternal, redDither) + DITHER32_INT == offsetof(SwsInternal, dither32));
|
||||
|
||||
if (c) {
|
||||
c->av_class = &ff_sws_context_class;
|
||||
av_opt_set_defaults(c);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue