[ADTSReader] Return false when id3tagparser fails due to eos #1630
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Use case of HLS+AAC audio
CADTSSampleReader::ReadSample call ADTSReader::ReadPacket each time kodi request buffer data but when the stream buffer reach the end the m_id3TagParser.parse cannot read data from m_stream by returning ID3TAG::PARSE_FAIL
this was breaking the while loop and return true
since return true was causing that CADTSSampleReader::ReadSample to return AP4_SUCCESS with bad data
where instead was needed to check for waitingForSegment and mark the m_eos as true, this to allow stop the playback and so avoid flooding kodi demuxer of bad package data
seem weird to me that its needed return true also when the audio data is not parsed
it come from the initial ISA implementation so it could be a very old oversight or a workaround for other problems
Motivation and context
fix #1629
How has this been tested?
Sample stream provided in pvt by user and other 2 hls+aac
Screenshots (if appropriate):
Types of change
Checklist: