[FFmpeg-devel] [PATCH v3] avcodec: fix atomics usage for h264/mpeg error_count
Michael Niedermayer
michael at niedermayer.cc
Tue Mar 13 20:07:33 EET 2018
On Tue, Mar 13, 2018 at 04:02:57PM +0000, Aman Gupta wrote:
> On Tue, Mar 13, 2018 at 4:39 AM Michael Niedermayer <michael at niedermayer.cc>
> wrote:
>
> > On Mon, Mar 12, 2018 at 06:49:19PM -0700, Aman Gupta wrote:
> > > From: Aman Gupta <aman at tmm1.net>
> > >
> > > ---
> > > libavcodec/h264_slice.c | 5 +++--
> > > libavcodec/mpeg12dec.c | 12 +++++++-----
> > > libavcodec/mpegvideo_enc.c | 3 ++-
> > > 3 files changed, 12 insertions(+), 8 deletions(-)
> >
> > Iam a little bit confused, you write about "fixing" but not what this is
> > fixing and it appears there are several distinct types of changes
>
>
> The type of error_count is already atomic_int. I don't know when that was
> changed.
>
> The fix here is that these files do not compile on FreeBSD because of
> errors such as:
>
> [2018-03-11 18:26:55.078686] [freebsd-x86_64] libavcodec/mpegvideo_enc.c:
> In function 'merge_context_after_encode':
>
> [2018-03-11 18:26:55.081607] [freebsd-x86_64]
> libavcodec/mpegvideo_enc.c:3578:33: error: invalid operands to binary +
> (have 'atomic_int' and 'atomic_int')
>
>
> [2018-03-11 16:43:23.543072] [freebsd-x86_64] CC libavcodec/mpeg12dec.o
>
> [2018-03-11 16:43:23.768864] [freebsd-x86_64] libavcodec/mpeg12dec.c: In
> function 'slice_decode_thread':
>
> [2018-03-11 16:43:23.769713] [freebsd-x86_64]
> libavcodec/mpeg12dec.c:1996:23: error: incompatible types when assigning to
> type 'atomic_int' from type 'int'
what compiler is this ?
6.5.16.1 Simple assignment
Constraints
One of the following shall hold: 114)
— the left operand has atomic, qualified, or unqualified arithmetic type, and the right has
arithmetic type;
Please someone correct me here if iam wrong but
To me this sounds like doing normal arithmetic operations between atomic and
non atomic arithmetic types is allowed.
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180313/fc1fbac1/attachment.sig>
More information about the ffmpeg-devel
mailing list