[FFmpeg-cvslog] error_resilience: remove avpriv_atomic usage

Matt Oliver protogonoi at gmail.com
Sun Nov 26 08:30:38 EET 2017


On 26 November 2017 at 02:17, Rostislav Pehlivanov <git at videolan.org> wrote:

> diff --git a/libavcodec/error_resilience.h b/libavcodec/error_resilience.h
> index 27c2008694..664a765659 100644
> --- a/libavcodec/error_resilience.h
> +++ b/libavcodec/error_resilience.h
> @@ -20,6 +20,7 @@
>  #define AVCODEC_ERROR_RESILIENCE_H
>
>  #include <stdint.h>
> +#include <stdatomic.h>
>

This commit breaks compilation with msvc. The inclusion of stdatomic.h
causes additional windows headers to also be pulled in. These windows
headers declare things that conflict with several other things throughout
the code base. The first as picked up by FATE (
http://fate.ffmpeg.org/log.cgi?slot=x86_32-msvc14-md-windows-native&time=20171126030144&log=compile)
is in avcodec/jpegls.h which has an struct member variable called near,
although one of the windows headers defines near as blank. Which requires
either an undef or renaming of near (ill leave that to the author to sort
out). There also an additional error in avcodec/mss2.c which creates a
struct called Rectangle where a struct with same name is already declared
in one of the windows headers (this would also require a rename).

  #include "avcodec.h"
>  #include "me_cmp.h"
> @@ -60,7 +61,7 @@ typedef struct ERContext {
>      ptrdiff_t mb_stride;
>      ptrdiff_t b8_stride;
>
> -    volatile int error_count;
> +    atomic_int error_count;
>      int error_occurred;
>      uint8_t *error_status_table;
>      uint8_t *er_temp_buffer;
>


More information about the ffmpeg-cvslog mailing list