Skip empty lines at the beginning of SRT files

This commit is contained in:
Moritz Bunkus 2010-03-03 19:11:31 +01:00
parent 55cb667876
commit a2ace0d1b3
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2010-03-03 Moritz Bunkus <moritz@bunkus.org>
* mkvmerge: bug fix: The SRT reader skips empty lines at the
beginning of the file.
2010-03-02 Moritz Bunkus <moritz@bunkus.org>
* Build system: bug fix: Fixed the configure script and compilation

View File

@ -44,8 +44,11 @@ bool
srt_parser_c::probe(mm_text_io_c *io) {
try {
io->setFilePointer(0, seek_beginning);
std::string s = io->getline();
std::string s;
do {
s = io->getline();
strip(s);
} while (s.empty());
int64_t dummy;
if (!parse_int(s, dummy))