Opened 17 months ago
Closed 17 months ago
#11641 closed defect (invalid)
ffmpeg 7.0 broke ABI for AVCodecID enum values
| Reported by: | Aras Pranckevicius | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avcodec |
| Version: | 7.0 | Keywords: | |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
Looks like removal of AV_CODEC_ID_AYUV (in 9ee59b63f5ea3 on 2024 March) has shifted all the following AVCodecID values to be 1 lower. There's a comment atop of enum saying "no value of an existing codec ID changes (that would break ABI)", so maybe literal removal is not a good approach.
Found in blender when update of ffmpeg to 7.0 broke AV1 support (https://projects.blender.org/blender/blender/issues/140740), since parts of blender assume that AVCodecID values never change, but they did in 7.0. Now, maybe that is a wrong assumption on blender's part, but this change could affect other software too.
Change History (6)
comment:1 by , 17 months ago
comment:2 by , 17 months ago
This would have been easier to spot if the enum values change was mentioned in the doc/APIchanges for the release, but ok fair enough!
comment:3 by , 17 months ago
If you needed to “spot” the change in codec id, then you are doing something wrong. A change in the major version means your application linked with the old ffmpeg libraries would not even load with the new libraries, which is something hard to not spot, and once you re-build the application with the new libraries it directly uses the new enum values, nothing to spot.
comment:4 by , 17 months ago
@Cigaes: the problem was that blender's codebase assumed that AVCodecID enum values would not change, i.e. it was writing the enum values into the data files (perhaps an incorrect assumption, but a comment atop of AVCodecID that says "never change enum values" kinda suggested it's fine). Which is a problem once/if they do change; as what has been written in the files previously now means an entirely different codec, when upgrading ffmpeg.
comment:5 by , 17 months ago
I would say it is not just an invalid assumption but a beginner's mistake.
comment:6 by , 17 months ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
Closing, as this is not a bug in FFmpeg.



ABI is allowed to change when the major version of the ffmpeg libraries changes, as was the case with 7.0.