mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.49k stars 2.92k forks source link

opengl-cb: update callback being called when not ready yet #4852

Open Akemi opened 7 years ago

Akemi commented 7 years ago

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

https://0x0.st/7zF.txt

Dudemanguy commented 1 year ago

Is this still a problem?

Akemi commented 3 months ago

yeah, it's still an issue. no forced window, it 'plays back' the first 2 seconds long video without any video output but audio playing. basically skipping to the next file.

https://github.com/user-attachments/assets/bbf92036-3191-4cc4-928b-bdc117399d6e