[FFmpeg-devel] [ffplay.c] do we need a lock for is->refresh

REN Lifeng renlifeng at wowfly.com
Thu Mar 22 00:36:57 CET 2012

Marton Balint <cus at passwd.hu> writes:

> On Wed, 21 Mar 2012, REN Lifeng wrote:
>> Both refresh_thread and the main thread (event_loop) may modify
>> is->refresh. So, do we need a mutex?
> No, I think we don't, because refresh thread is only setting it from 0
> to 1, event loop is only setting it from 1 to 0.

You are right. 
I would never learn this from textbook. Thank you very much!

>> I do not see any bug been triggered by it, though.

More information about the ffmpeg-devel mailing list