-
Notifications
You must be signed in to change notification settings - Fork 242
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
Some cleanup to AdaptiveStream and Session #1351
Conversation
The CSession::AddStream already provide the initial representation based on the same chooser GetRepresentation() method
This is already done in the CInputStreamAdaptive::OpenStream by m_session->PrepareStream method
i dont know reason but dash dont works anymore, i will need to investigate |
problem fixed |
src/common/AdaptiveStream.cpp
Outdated
// Dont change representation if it is the last segment of a period | ||
if (isLastSegment) | ||
newRep = prevRep; |
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.
I forgot about this.
I don't think my existing code was correct because I noticed a crash on this once. It was a long time ago so I can't remember the exact details - hoping that your change from using valid_segment_buffers_ to available_segment_buffers_ is where my error was.
FYI the reason behind adding this condition was that when it comes time to play the last segment in a period, AdaptiveStream wasn't able to insert the initialization segment (in the case of fMP4) and you would get corrupted or blank video for the last segment.
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.
hmm better if i add this as comment in the code
This also remove the forced limitation to allow choosers for video stream only
if an error occours CSession::EnableStream erase the timingStream pointer but CInputStreamAdaptive::DemuxRead continue to receive callbacks from kodi that can cause a crash
Avoid that PostInit to be called more times during playback
This was printed also playing not encrypted content
Description
Some cleanup to AdaptiveStream and Session should not functionality change some details on commits
the only exception is that the Choosers now can get callbacks for stream different than VIDEO (audio/subs) that however are already handled
Motivation and context
i was investigating to improve HLS parser and im stuck on some of these to do future cleanups
How has this been tested?
Screenshots (if appropriate):
Types of change
Checklist: