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

[ADTS] - Initialise pts #1241

Merged
merged 1 commit into from
Apr 30, 2023
Merged

[ADTS] - Initialise pts #1241

merged 1 commit into from
Apr 30, 2023

Conversation

glennguy
Copy link
Contributor

Description

Fixes starting ADTS streams beginning on 0 pts. Streams in this scenario will play fine if they are resumed from non-zero, in this case the first segment passed to the reader has a non-zero pts. But when starting from 0 we end up using the uninitialised value for pts.

Motivation and context

Attempting to fix this issue here: aussieaddons/plugin.video.abc_iview#3091
The cause of that issue is separate (malformed master playlist that has combined a/v .ts stream, but specifies non-existent separate audio stream) however an alternate is available which has separate a/v streams. Switching to the alternate stream revealed this issue.

How has this been tested?

Tested against several problematic streams from the above provider

Screenshots (if appropriate):

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:

  • I have read the Contributing document
  • My code follows the Code Guidelines of this project
  • My change requires a change to the Wiki documentation
  • I have updated the documentation accordingly

@glennguy glennguy added Type: Fix non-breaking change which fixes an issue Backport: Needed v21 Omega labels Apr 29, 2023
@glennguy glennguy requested a review from CastagnaIT April 29, 2023 04:16
@@ -132,8 +132,7 @@ bool ADTSFrame::parse(AP4_ByteStream *stream)
/**********************************************************************************************************************************/


ADTSReader::ADTSReader(AP4_ByteStream *stream)
: m_stream(stream)
ADTSReader::ADTSReader(AP4_ByteStream* stream) : m_stream{stream}, m_basePts{0}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice small fixes are the most obscure
but instead add here, please initialize vars by using his class source

uint64_t m_basePts, m_pts;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :)

Fixes starting ADTS streams beginning on 0 pts
@glennguy glennguy merged commit 9d35e94 into xbmc:Omega Apr 30, 2023
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 v21 Omega
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants