love
love copied to clipboard
When other applications are running, videos start to get artifacts and can lock up
Original report by Varun Ramesh (Bitbucket: varunr, GitHub: varunr).
When other applications are running (generally video players / recorders), videos in Love start to get artifacts. This is unfortunate, but what's worse is the video will permanently lock up after artifacts accumulate. video:tell() freezes at a certain value and video:isPlaying() always returns true.
When this happens, love.update and love.draw callbacks are still being called, so ui elements still work correctly. However, when the game quits, the process does not exit and must be killed.
I've attached a repro .love. I recommend running it while another video player is playing or OBS is recording.
Original comment by Varun Ramesh (Bitbucket: varunr, GitHub: varunr).
Here's a recording of what the artifacts / lockup look like.
Original comment by Varun Ramesh (Bitbucket: varunr, GitHub: varunr).
As far as I can tell, the freezing is due to an infinite loop in OggDemuxer::readPage(). ogg_sync_pageout
always returns zero and file->read
also always returns zero.
Original comment by Varun Ramesh (Bitbucket: varunr, GitHub: varunr).
Commenting out the lagCounter
code in TheoraVideoStream::threadedFillBackBuffer
seems to fix the lockup. I still get artifacts, but that's not as big of a problem. I'm thinking that the issue has to do with trying to seek past the end of the file while trying to compensate for lag.
#!c++
// if (lagCounter++ > 5)
// {
// seekDecoder(position);
// lagCounter = 0;
// }