[SubtitleSampleReader] Restored old pts workaound #1522
Merged
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
This problem has been hidden since early ISA versions,
but it was highlighted when i reworked Dash parser and introduced also EXT-X-PROGRAM-DATE-TIME on HLS
the main problem is on DTSorPTS() comparison
inputstream.adaptive/src/Session.cpp
Lines 1067 to 1069 in a82e3eb
we are comparing audio/video/subtitles,
for audio/video the pts/dts come from demuxer, but subtitles use pts from manifest or from subtitle data "cue" timing
these values not always are comparable with audio/video, because pts/dts that come from demuxer packet data
can be different and makes this package selection totally ineffective
other details on comments:
#1507 (comment)
#1507 (comment)
this PR for now i restore the old behaviour by removing the period start pts from segment pts
this will result that the subtitle "packet" pts will have most of time always a lower pts compared to audio/video
and then will be processed immediately without any control
an appropriate solution will be needed in future
since i think that weird thing can happens anyway
for example with all uses of lastPts variable:
inputstream.adaptive/src/main.cpp
Line 396 in a82e3eb
that need to be at same time re-checked
Motivation and context
"fix" #1419 (comment)
"fix" #1507 (comment)
How has this been tested?
D+
Screenshots (if appropriate):
Types of change
Checklist: