Skip to content

lookahead: Keep b_exit_thread under ifbuf.mutex

Jean-Baptiste Kempf requested to merge jbk/x264:asan into master

The lookahead_thread main loop checks b_exit_thread and exits if it is set. That flag is set by x264_lookahead_delete, which uses ifbuf.mutex to guard accessing it. However, the read in the while-loop condition of lookahead_thread is not guarded, and so TSAN sometimes reports a data race.

Merge request reports