aliubimov / xbmc

Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS and Windows.
https://kodi.tv/
Other
7 stars 2 forks source link

Video breaking up while seeking #7

Open aliubimov opened 3 years ago

aliubimov commented 3 years ago

Bug:

Open video file and seek back and forth. Eventually, Kodi player will fail with green screen which is recoverable only with restart.

waltermaldonado commented 3 years ago

This is also happening to me, and besides that, I cannot start a video from the point I earlier stopped, the video will only play if I start from beginning. The spinner shows up on the screen and stays there indefinitely. During this time I checked my jtop and the NVDEC gets used, the GPU stays at ~40% usage and the playing progress is being accounted.

aliubimov commented 3 years ago

Will prioritize this issue and get it fixed once I have a bit of free time.

nixx77 commented 3 years ago

Also, when seeking, allocated memory size keeps increasing (both in jtop and in in kodi debug overlay if enabled), and for me it usually crashed and/or greenscreened when it ran out of memory.

If you dont have time to look into it yet, but have any specific ideas where the problem might be, I could try help debugging it (have experience with video decoding, including nvidia/jetson, but the overall codebase of kodi is too big for the spare time I have)

aliubimov commented 3 years ago

Problem happens in buffer re-allocation, once decoder is closed. Seems like I messed up it pretty badly, and in general there is no reason to close decoder on seek.

Correct flow would be, to send empty buffer indicating EOS, and once all buffers returned, start pushing new data to decoder. That is quite a change.

Unfortunately, my spare time is a bit limited too.