AlexPoint / SubtitlesParser

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

The TextWriter writer should not be closed in the WriteStream method #39

Open doggy8088 opened 8 months ago

doggy8088 commented 8 months ago

The WriteStream in the SrtWriter method might called multiple times. I think the TextWriter writer should not be closed early in this method.

https://github.com/AlexPoint/SubtitlesParser/blob/19ab8d31859e4556ee8adbe4649fe837d4522228/SubtitlesParser/Classes/Writers/SrtWriter.cs#L58-L72

AlexPoint commented 8 months ago

Good catch! Indeed, the TextWriter object should be closed to avoid any issue. Could you submit a fix so that I can package a corrective version?