Strip spaces before integer parsing.

This commit is contained in:
Moritz Bunkus 2004-07-23 22:22:28 +00:00
parent 082e92e55a
commit 1ff5ffa311
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2004-07-24 Moritz Bunkus <moritz@bunkus.org>
* mkvmerge: bug fix: SRT file recognition failed if the file
contained spaces at the end of the first line.
2004-07-21 Moritz Bunkus <moritz@bunkus.org>
* mkvextract: new feature: Implemented the extraction of chapter

View File

@ -54,6 +54,7 @@ srt_reader_c::probe_file(mm_text_io_c *mm_io,
try {
mm_io->setFilePointer(0, seek_beginning);
s = mm_io->getline();
strip(s);
if (!parse_int(s.c_str(), dummy))
return 0;
s = mm_io->getline();