Change #260057
| Category | ffmpeg |
| Changed by | Niklas Haas <git@haasn.dev> |
| Changed at | Fri 06 Mar 2026 19:06:33 |
| Repository | https://git.ffmpeg.org/ffmpeg.git |
| Project | ffmpeg |
| Branch | master |
| Revision | 47f89ea88ba1ae9a9ac5b1b9bfa6063dfbd8c73a |
Comments
swscale: explicitly track if a context is "legacy" or not The legacy API is defined by sws_init_context(), sws_scale() etc., whereas the "modern" API is defined by just using sws_scale_frame() without prior init call. This int allows us to cleanly distinguish the type of context, paving the way for some minor refactoring. As an immediate benefit, we now gain a bunch of explict error checks to ensure the API is used correctly (i.e. sws_scale() not called before sws_init_context()). Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <git@haasn.dev>
Changed files
- libswscale/swscale.c
- libswscale/swscale_internal.h
- libswscale/utils.c