summaryrefslogtreecommitdiffstats
path: root/libass
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-03-06 13:28:48 +0100
committerwm4 <wm4@nowhere>2015-03-06 13:28:48 +0100
commit9beeecc2d1676eeb663ffd8706fe33cbf5eb2069 (patch)
treefc5882f38bae945ae1cc22e0ce825a245ba3485a /libass
parentb4c39b894dba63ff103441f4e2f307a905bb1583 (diff)
downloadlibass-9beeecc2d1676eeb663ffd8706fe33cbf5eb2069.tar.bz2
libass-9beeecc2d1676eeb663ffd8706fe33cbf5eb2069.tar.xz
Make timestamp parsing more lenient
Fixes "[ARR] Musashi no Ken - 01 [AVC][5697986B].ssa", which has timestamps like "00:02:30.85". It starts with 2 zeros instead of one, which probably means it's an invalid file, but it's accepted by various other parsers (VSFilter, MPlayer, vlc, ffmpeg).
Diffstat (limited to 'libass')
-rw-r--r--libass/ass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libass/ass.c b/libass/ass.c
index 04ce895..594cca3 100644
--- a/libass/ass.c
+++ b/libass/ass.c
@@ -183,7 +183,7 @@ static long long string2timecode(ASS_Library *library, char *p)
{
unsigned h, m, s, ms;
long long tm;
- int res = sscanf(p, "%1d:%2d:%2d.%2d", &h, &m, &s, &ms);
+ int res = sscanf(p, "%d:%d:%d.%d", &h, &m, &s, &ms);
if (res < 4) {
ass_msg(library, MSGL_WARN, "Bad timestamp");
return 0;