[rbp] Set mediatime on GPU after a seek. #2537

Merged
merged 1 commit into from Apr 3, 2013

Projects

None yet

3 participants

@popcornmix
Member

Currently after a seek, the mediatime doesn't update until an audio and video packet have been fetched from demuxer, and been decoded. For HD content this can take a second or two.
This has a couple of undesirable effects:
The seek time that pops up after a seek initially shows the before seek time, and the file progress bar is laggy.
If you seek a second time, before the time has updated, it will use the before seek time, and the second seek has no effect.
This limits a sequence of seeks to a maximum of about 1 every second or two.

The fix udpates the GPU mediatime immediately after the seek, so the mediatime is correct immediately which fixes the undesirable behaviour.

@popcornmix popcornmix [rbp] Set mediatime on GPU after a seek.
Currently after a seek, the mediatime doesn't update until an audio and video packet have been fetched from demuxer, and been decoded. For HD content this can take a second or two.
This has a couple of undesirable effects:
The seek time that pops up after a seek initially shows the before seek time, and the file progress bar is laggy.
If you seek a second time, before the time has updated, it will use the before seek time, and the second seek has no effect.
This limits a sequence of seeks to a maximum of about 1 every second or two.

The fix udpates the GPU mediatime immediately after the seek, so the mediatime is correct immediately which fixes the undesirable behaviour.
c106cfd
@huceke huceke merged commit 030f960 into xbmc:master Apr 3, 2013
@arnova

This looks a bit weird. Might as well make the if above "if((g_guiSettings.GetBool("videoplayer.usedisplayasclock") && m_has_video) || !m_has_audio), right?

Member

It wants the same logic as OMXSetReferenceClock, so I followed the style of that function (even though that's not how I would have written it initially).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment