opengl-cb: update callback being called when not ready yet
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
mpv version and platform
latest git master, macOS 10.12.5
Reproduction steps
using --vo=opengl-cb --dither-size-fruit=8 leads to a black screen on playback start. i could reproduce it with git master, with a cocoa libmpv example and with my cocoa-cb branch (#4833).
Expected behavior
either doesn't start playback yet and/or renders the actual frame.
Actual behavior
initialising such a big dither matrix takes quite a long time, mpv can't actually render frames yet, but already starts playback. despite that the opengl-cb update callback is already being called and the following draw call is blocking. this leads to a black screen but the audio already playing. this also deactivates display-resample since it is reported as a massive amount of dropped frames. after some time, when the matrix is initialised, the frames start to draw.
with opengl it doesn't start playback till the matrix is actually initialised.
Log file
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the --vo=opengl-cb path and its update callback, then compare startup behavior with regular opengl. Reproduce with --dither-size-fruit=8 using a Cocoa libmpv example and inspect the linked log. Done means playback does not invoke updates before rendering is ready and avoids the reported black screen and premature audio.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- api, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100