[FFmpeg-devel] [PATCH 5/6] h264: don't sync pic_id between threads.

Ronald S. Bultje rsbultje at gmail.com
Fri Mar 31 17:13:49 EEST 2017


Hi,

On Fri, Mar 31, 2017 at 10:08 AM, Michael Niedermayer <
michael at niedermayer.cc> wrote:

> On Wed, Mar 29, 2017 at 10:12:23AM -0400, Ronald S. Bultje wrote:
> > This is how the ref list manager links bitstream IDs to H264Picture/Ref
> > objects, and is local to the producer thread. There is no need for the
> > consumer thread to know the bitstream IDs of its references in their
> > respective producer threads.
> >
> > In practice, this fixes the last tsan warnigns when running fate-h264.
> > ---
> >  libavcodec/h264_picture.c | 1 -
> >  1 file changed, 1 deletion(-)
>
> patch is probably ok though iam not sure what issue tsan has with this


In multi-slice files, the second slice will re-do the reflist lookup, which
writes to pic_id. At the same time, the next thread would sync pic_id
between decoding instances. The write-while-sync is the reported race
condition.

(The reported race is obviously harmless.)

Ronald


More information about the ffmpeg-devel mailing list