[subtitles] Fix CC condition for valid captions #21410
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
"Borrowed" from VLC (videolan/vlc@67dd763) this attempts to fix the condition used to let the demuxing of closed captions proceed.
Motivation and context
A user reported the bug and provided a sample file in https://forum.kodi.tv/showthread.php?tid=368221
Kodi is unable to show those captions while vlc or mpv play them without any issues.
How has this been tested?
Runtime tested, played some samples I knew Kodi was able to handle before + the failing one.
What is the effect on users?
Some CC subs that were previously not playing should now be playable.
Screenshots (if appropriate):
Master:
![image](https://user-images.githubusercontent.com/7375276/168626121-14b5b1a3-d683-4079-8163-53f793d7df99.png)
![Screenshot from 2022-05-16 16-12-27](https://user-images.githubusercontent.com/7375276/168625546-3fd76cd5-9ae2-43c8-9b4d-ba7f2425fd06.png)
PR:
![image](https://user-images.githubusercontent.com/7375276/168625862-3fe4ecfc-5435-44f3-a01e-92624190ae2a.png)
Types of change