Skip to content

vout: simplify deadline handling

Romain Vimont requested to merge rom1v/vlc:vout_deadline into master

The deadline computation was shared between the vout thread function and DisplayPicture(), both by hacking the return value (VLC_EGENERIC meaning "wait") and using an output parameter, to handle 3 possible cases:

  • VLC_SUCCESS: do not wait
  • VLC_EGENERIC and deadline set: wait for deadline
  • VLC_EGENERIC and deadline not set: wait but no deadline is known

In case of VLC_EGENERIC, the vout thread function computed the max between the returned value and 100ms.

Simplify by computing the expected deadline from DisplayPicture() directly.

Edited by Romain Vimont

Merge request reports