h264: don't touch H264Context->ref_count[] during MB decoding
authorRonald S. Bultje <rsbultje@gmail.com>
Wed, 3 Oct 2012 23:25:14 +0000 (16:25 -0700)
committerLuca Barbato <lu_zero@gentoo.org>
Fri, 5 Oct 2012 00:49:45 +0000 (02:49 +0200)
commitf6f7d1504134683c435e2c7d804279d982e52bb4
treefff69ec29a5fb7e1feb81abe54f501b04bef52b7
parenta7329e5fc22433dfeaf7af22fb40fe3cada21385
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.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/h264_cabac.c
libavcodec/h264_cavlc.c