vout: fix DisplayPicture() return value
If deadline is NULL, then frame_by_frame is true, then render_now is true, so DisplayPicture() returns VLC_EGENERIC.
Therefore, DisplayPicture() called from vout_NextPicture() could never return 0 (VLC_SUCCESS), so the if-block in vout_NextPicture() was unreachable.
The first commit provides a minimal fix. The following commits refactor the code to move frame-by-frame handling to a separate function to simplify.
Due to the structure of the changes, I strongly suggest to review this MR with --patience -b from command line:
git fetch origin merge-requests/277/head
git log -p -b --patience --reverse FETCH_HEAD~3..
or with tig:
git fetch origin merge-requests/277/head
tig -b --patience FETCH_HEAD~3..