-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[VP] Fix short stream changes #17713
Conversation
This is also a fix for xbmc/inputstream.adaptive#332 and add-ons/plugin.video.vtm.go#139 The previous attempt to fix this was #16658, but that PR was reverted. |
I tested this a bit and I can confirm this fixes AV sync issues with one small period followed by a longer period. But, it seems this doesn't fix the issues when there are multiple small periods followed by a longer period. This also introduces a new problem with seeking. I got |
Thx, will look later at it
|
Forced pushed a change @mediaminister, thx for testing! |
Thanks, I can confirm seeking with the up arrow key works perfectly now. But when the stream starts with two small periods, there is still an AV sync issue when the third (long) period starts. Here is a full debug log: |
Yes, I know, will try to fix this, too |
@mediaminister I added a condition -> pls. check again |
I tested but this doesn't solve it. |
I'll add some more logging, I'm in opinion that your update was not successful. |
Did you try with "Loïc: Zot van Koken", because there is an extra sponsor advertisement before the program starts.
in autoexec.py For me it isn't solved on Linux x64. Here is a new log with the extra logging: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow the current code guidelines.
if (m_CurrentVideo.id >= 0 && m_CurrentVideo.inited && m_CurrentAudio.id >= 0 && | ||
m_CurrentAudio.inited | ||
&& ((m_CurrentVideo.syncState == IDVDStreamPlayer::SYNC_STARTING | ||
||m_CurrentAudio.syncState == IDVDStreamPlayer::SYNC_STARTING) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conventional operators have to be surrounded by one space on each side.
https://github.com/xbmc/xbmc/blob/master/docs/CODE_GUIDELINES.md#34-whitespace
@mediaminister next try, thx for testing |
Thanks a lot, it plays perfectly now, all av sync issues seems to be fixed! But, the I tested with
in autoexec.py Debug log: |
@mediaminister the stream should now continue after seek, but - assuming that you start seeking while in a short chapter - continues at the beginning of the chapter seeked. This is something I'll fix in a second step in inputstream.adaptive. |
Yes, the stream continues after seeking now, but the AV sync bug when a third (long) period starts is reintroduced: |
@mediaminister latest commit should be working now. |
Thanks a lot @peak3d, I can confirm all AV sync issues are gone and seeking works: |
OMG. It finally happened! @peak3d and @mediaminister you guys rule! |
I don't think this is a hack. It kind of does what @FernetMenta suggested in the post below. Postpone any further reads (or stream changes) until the current one is complete. In this case it mean starting the players. Nice work @peak3d |
@fritsch this PR is now for several weeks in the milhouse builds (rbpi / x86 linux) and I have not found a single negative report in his forum thread. How should we proceed? I use this PR for long time, too, without any issues. If you know how to reproduce refering to the comment of @FernetMenta, can you pls. reproduce or guide me / us to get it reproduced? |
I reverted this change in my local build as it does indeed break with PVR. I couldn't reproduce reliably (it was on the family box in the living room) but I did have several instances where I had to power down the device. Since the revert zero power cycles. |
The problem here is that folks are egoistic and only interested in their own use cases, not showing respect for other scenarios which are not their own priorities (pvr in this case). Even users with no coding knowledge at all chime in and try to push their use cases regardless if it breaks existing stuff. Nevertheless
It's that simple. Ask for help and you'll get it. Try this change (I did some time ago) first: |
For me @FernetMenta fix works (Disney+), curious if it also works with vtm go |
I can confirm this works for VTM GO: shortshapter.log Can this be backported to the Leia branch? |
If you don't apply the full patch I provided, dynamic program changes on live TV won't get fixed. |
The first hunk is not in current master, it was rejected. But let me search again. |
@peak3d sorry, you are right. this was some debug helper code that never made it to master. |
Jenkins build this please |
IOS build issue unrelated |
[VP] Fix short stream changes
[VP] Fix short stream changes
[VP] Fix short stream changes
[VP] Fix short stream changes
[VP] Fix short stream changes
[VP] Fix short stream changes
[VP] Fix short stream changes
[VP] Fix short stream changes
[VP] Fix short stream changes
[VP] Fix short stream changes
[VP] Fix short stream changes
Description
Thx to @FernetMenta who provide a proper fix for the sync issues if we have short chapters devided by DMX_SPECIALID_STREAMCHANGE.
Motivation and Context
If multi chapter streams start with a short into (in my example 3 sec), DMX_SPECIALID_STREAMCHANGE arrives from demuxer before the first packet was decoded and therefore player started. This leads to AV sync issues and depending on the device to long chapter crossings.
How Has This Been Tested?
Play Mandalorian S1E1 with Disney addon on NVIDIA Shield TV
Play VTM Go "Loïc: Zot van Koken"
Types of change