[FFmpeg-devel] [PATCH 1/2] avutil/threadmessage: add av_thread_message_flush()
george at nsup.org
Wed Dec 2 15:52:14 CET 2015
Le duodi 12 frimaire, an CCXXIV, Clement Boesch a écrit :
> - there is a large queue of packets, almost filled
> - there is one fast sender filling the queue (the demuxer)
> - there is a bunch of slow readers reading from the queue (the decoders)
> - the sender "receives" a seek event from the user
> - the sender now wants to stop as fast as possible readers (decoders)
> from reading all kind of packets
> If that sender has to lock for every message it's going to read & drop,
> while the decoders are still fighting to read them from the queue, it
> looks very ineffective to me.
This, especially "looks very ineffective", sounds like premature
optimization. I am not against it, but then the documentation should tell it
is an optimization. And conversely, if it is not only a matter of efficiency
but also of correctness, the documentation must explain what the risk is.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: Digital signature
More information about the ffmpeg-devel