You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
List<SubtitleItem>items=subtitleItems.ToList();// avoid multiple enumeration since we're using a for instead of foreach
for(inti=0;i<items.Count;i++)
{
SubtitleItemsubtitleItem=items[i];
IEnumerable<string>lines=SubtitleItemToSubtitleEntry(subtitleItem,i+1,includeFormatting);// add one because subtitle entry numbers start at 1 instead of 0
foreach(stringlineinlines)
writer.WriteLine(line);
writer.WriteLine();// empty line between subtitle entries
}
}
The text was updated successfully, but these errors were encountered:
The
WriteStream
in theSrtWriter
method might called multiple times. I think theTextWriter writer
should not be closed early in this method.SubtitlesParser/SubtitlesParser/Classes/Writers/SrtWriter.cs
Lines 58 to 72 in 19ab8d3
The text was updated successfully, but these errors were encountered: