#4216 closed defect (fixed)
#define PixelFormat AVPixelFormat breaks user code
Reported by: | kivalaatikko | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avutil |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
In avutil/pixfmt.h
#define PixelFormat AVPixelFormat
prevents users from using the word "PixelFormat" anywhere in their own code, even if in namespaces.
Probably fixable by changing to typedef instead.
Change History (4)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
If it were a typedef, it would break C code which uses "enum PixelFormat".
But yeah, all exported identifiers are supposed to be prefixed with AV, av_, or FF_, and this is just a compatibility hack for older software still using the old identifiers. Maybe it's time to drop them?
comment:3 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 9 years ago
Keywords: | PixelFormat removed |
---|---|
Version: | 2.5.2 → git-master |
Note:
See TracTickets
for help on using tickets.
You can get rid of this with "#define FF_API_PIX_FMT 0" before including the ffmpeg headers.