Skip to content
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

Resume paused ActiveAE stream while draining to avoid playback lapse #17090

Merged
merged 1 commit into from Dec 29, 2019
Merged

Resume paused ActiveAE stream while draining to avoid playback lapse #17090

merged 1 commit into from Dec 29, 2019

Conversation

djp952
Copy link
Contributor

@djp952 djp952 commented Dec 28, 2019

Description

Resolution for Issue 17080, provided by @FernetMenta.

During MPEG-TS playback, an audio stream format change, for example from 6-channel to 2 channel, can cause a lapse of up to 2 seconds where no audio will be produced by the VideoPlayer. When the format change is detected, the current stream is drained, but remains in a paused state until the drain operation is complete, causing this lapse

Motivation and Context

Since the release of Kodi 18.0, I have experienced numerous MPEG-TS programs that exhibit this behavior, primarily during commercial breaks. While the issue was generally present on specific PVR addon channels, pulling the MPEG-TS file out into the normal Videos library showed that it was not specific to just PVR addons.

Issue 17080

How Has This Been Tested?

Tested on Windows x64 using build from Kodi 18.5 release tag. Provided sample file from linked issue plays without the lapse now, and have not experienced audio lapses using PVR addon with known problematic channels.

Screenshots (if appropriate):

N/A

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

And for once, I finally have the clang-format stuff working so I don't think I'm going to get dinged on format.

Thank you @FernetMenta for providing the solution, this has been a problem spot for me for quite some time!!

@fritsch fritsch added this to the Matrix 19.0-alpha 1 milestone Dec 28, 2019
@fritsch fritsch added the Type: Fix non-breaking change which fixes an issue label Dec 28, 2019
@fritsch
Copy link
Member

fritsch commented Dec 28, 2019

Thanks much. Let's get it build and then we put it in.

@fritsch
Copy link
Member

fritsch commented Dec 28, 2019

jenkins build this please

@fritsch
Copy link
Member

fritsch commented Dec 29, 2019

UWP failure not related.

Feel free to PR it towards Leia. Thanks much

@HeresJonny
Copy link

Is this also applicable to music when a format change of samplerate and/or channels occurs?

@djp952
Copy link
Contributor Author

djp952 commented Jan 1, 2020

@HeresJonny, I have no idea. If you have a sample file available I'm happy to try it on the build I made for myself to test this PR. Your best bet is likely to be to open an Issue describing the problem and let the good folks here have a crack at it for you. Again, I'm happy to try it for you offline if you'd like, perhaps you could use my github to open an issue (use the pvr.hdhomerundvr repo), even though it's not a PVR thing, we can start a conversation outside of this PR discussion. (NOTE: I doubt I can actually help, but am always willing to try)

@djp952 djp952 deleted the mpegts-audiodrop branch January 8, 2020 03:38
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Jan 21, 2020
Resume paused ActiveAE stream while draining to avoid playback lapse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport: Done Type: Fix non-breaking change which fixes an issue v19 Matrix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants