Skip to content

vlc_stream: wait a bit when there's no data available.

Steve Lhomme requested to merge robUx4/vlc:stream_read into master

If there's no data available (vlc_stream_ReadPartial() returns -1) we should wait a bit for the buffers to replenish. Otherwise we might loop infinitely, wasting CPU cycles.

If we get -1 that means the reader is not going to do any waiting for us, so we should do it here.

vlc_tick_sleep() is canceleable so it has no impact on the cancelability of the call.

Merge request reports