]> git.sesse.net Git - ffmpeg/commit
lavc/h264: don't touch H264Context->ref_count[] during MB decoding.
authorRonald S. Bultje <rsbultje@gmail.com>
Thu, 4 Oct 2012 07:01:45 +0000 (09:01 +0200)
committerClément Bœsch <ubitux@gmail.com>
Fri, 5 Oct 2012 05:35:58 +0000 (07:35 +0200)
commit2e59210edfe822cce1369dd962d791cc9d45798b
treef7732535b6196830265b14ec87d6d67469b84478
parent5cdd3b995c9dd79ab6ab852a27e75a21c0eb4f5f
lavc/h264: don't touch H264Context->ref_count[] during MB decoding.

The variable is copied to subsequent threads at the same time, so this
may cause wrong ref_count[] values to be copied to subsequent threads.

This bug was found using TSAN and Helgrind.

Original patch by Ronald, adapted with a local_ref_count by Clément,
following the suggestion of Michael Niedermayer.

Signed-off-by: Clément Bœsch <clement.boesch@smartjog.com>
libavcodec/h264_cabac.c
libavcodec/h264_cavlc.c