AlexPoint / SubtitlesParser

Multi formats subtitles parser in C#
MIT License
134 stars 40 forks source link

Handle vtt file that has no captions #13

Closed jefflward closed 5 years ago

jefflward commented 5 years ago

These changes update the vtt parser to not throw if it parses and does not find any captions. Under normal circumstances this is not an issue but technically a vtt file without captions is still valid. Ideally maybe this behavior would be based on how you configure the parser but for now this helps us handle empty vtt files.

AlexPoint commented 5 years ago

Since the parsers themselves throw an exception in the ParseStream method, your suggestion indeed works. Thank you for your contribution.