[FFmpeg-devel] [PATCH 1/4] avcodec/allcodecs: make avcodec_register_all thread safe

James Almer jamrial at gmail.com
Tue Mar 7 05:07:18 EET 2017


On 3/6/2017 11:55 PM, Michael Niedermayer wrote:
> On Tue, Mar 07, 2017 at 02:47:36AM +0700, Muhammad Faiz wrote:
>> Signed-off-by: Muhammad Faiz <mfcc64 at gmail.com>
>> ---
>>  libavcodec/allcodecs.c | 13 ++++++++++---
>>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> fails to build
> 
> ibavcodec/allcodecs.c: In function ‘avcodec_register_all’:
> libavcodec/allcodecs.c:68:5: error: implicit declaration of function ‘typeof’ [-Werror=implicit-function-declaration]
> libavcodec/allcodecs.c:68:33: error: expected ‘;’ before ‘_obj’
> libavcodec/allcodecs.c:68:78: error: expected ‘;’ before ‘_old’
> libavcodec/allcodecs.c:68:87: error: ‘_old’ undeclared (first use in this function)
> libavcodec/allcodecs.c:68:87: note: each undeclared identifier is reported only once for each function it appears in
> libavcodec/allcodecs.c:68:119: error: ‘_obj’ undeclared (first use in this function)
> libavcodec/allcodecs.c:68:78: error: incompatible type for argument 1 of ‘__sync_bool_compare_and_swap’
> cc1: some warnings being treated as errors
> make: *** [libavcodec/allcodecs.o] Error 1
> make: *** Waiting for unfinished jobs....

This is from the compat header for c11 atomics on old GCC versions.
Looks like it should be using __typeof__ instead.

Try the attached patch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-compat-atomics-gcc-use-__typeof__-instead-of-typeof.patch
Type: text/x-patch
Size: 1902 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170307/9150e2f4/attachment.bin>


More information about the ffmpeg-devel mailing list