diff options
author | Oleg Oshmyan <chortos@inbox.lv> | 2015-10-29 02:56:14 +0200 |
---|---|---|
committer | Oleg Oshmyan <chortos@inbox.lv> | 2015-10-29 03:00:50 +0200 |
commit | 5d7093a54ed23d76f9f6f5638a39a40b4640f90d (patch) | |
tree | 67ccedcb070f04e4de5a6745af4fd293e36210c9 /libass/ass.c | |
parent | 52a5dddb15b9ea40bde69222b47e7d5a9a00571e (diff) | |
download | libass-5d7093a54ed23d76f9f6f5638a39a40b4640f90d.tar.bz2 libass-5d7093a54ed23d76f9f6f5638a39a40b4640f90d.tar.xz |
Interpret timestamps with negative components more obviously
Keep all components signed, allowing for timestamps like 00:01:-05.00
to denote 55 seconds. This matches the behavior of VSFilter.
Diffstat (limited to 'libass/ass.c')
-rw-r--r-- | libass/ass.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libass/ass.c b/libass/ass.c index 094cc92..1a2a364 100644 --- a/libass/ass.c +++ b/libass/ass.c @@ -224,9 +224,9 @@ static void set_default_style(ASS_Style *style) static long long string2timecode(ASS_Library *library, char *p) { - unsigned h, m, s, ms; + int h, m, s, ms; long long tm; - int res = sscanf(p, "%u:%u:%u.%u", &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; |