From 1ff5ffa31146ac3ea5d2179e23eecf22adff15b4 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 23 Jul 2004 22:22:28 +0000 Subject: [PATCH] Strip spaces before integer parsing. --- ChangeLog | 5 +++++ src/input/r_srt.cpp | 1 + 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index f08c9af30..f846f1476 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-07-24 Moritz Bunkus + + * mkvmerge: bug fix: SRT file recognition failed if the file + contained spaces at the end of the first line. + 2004-07-21 Moritz Bunkus * mkvextract: new feature: Implemented the extraction of chapter diff --git a/src/input/r_srt.cpp b/src/input/r_srt.cpp index 60a9c35ca..a9bde5856 100644 --- a/src/input/r_srt.cpp +++ b/src/input/r_srt.cpp @@ -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();