diff options
author | jstebbins <[email protected]> | 2014-12-16 23:59:23 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2014-12-16 23:59:23 +0000 |
commit | 217d6e9d87b5bdfe75a18b3e5f87327505459cbe (patch) | |
tree | f39a0fb00b157843a86d91cfc5d1e0cc40594ae5 /libhb/muxavformat.c | |
parent | cb6a52dcf9b33810272773fa02b457e3a4c8b7f0 (diff) |
mux: fix format of ssa preamble
sprintf decimal specifier was using the system local to insert a ','
where there should have been a '.'
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6604 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/muxavformat.c')
-rw-r--r-- | libhb/muxavformat.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c index a494bf0ef..668957e47 100644 --- a/libhb/muxavformat.c +++ b/libhb/muxavformat.c @@ -1158,18 +1158,18 @@ static int avformatMux(hb_mux_object_t *m, hb_mux_data_t *track, hb_buffer_t *bu { // avformat requires the this additional information // which it parses and then strips away - int start_hh, start_mm, stop_hh, stop_mm, layer; - float start_ss, stop_ss; + int start_hh, start_mm, start_ss, start_ms; + int stop_hh, stop_mm, stop_ss, stop_ms, layer; char *ssa; start_hh = buf->s.start / (90000 * 60 * 60); - start_mm = (buf->s.start / (90000 * 60)); - start_ss = ((float)buf->s.start / 90000) - start_mm * 60; - start_mm %= 60; + start_mm = (buf->s.start / (90000 * 60)) % 60; + start_ss = (buf->s.start / 90000) % 60; + start_ms = (buf->s.start / 900) % 100; stop_hh = buf->s.stop / (90000 * 60 * 60); - stop_mm = (buf->s.stop / (90000 * 60)); - stop_ss = ((float)buf->s.stop / 90000) - stop_mm * 60; - stop_mm %= 60; + stop_mm = (buf->s.stop / (90000 * 60)) % 60; + stop_ss = (buf->s.stop / 90000) % 60; + stop_ms = (buf->s.stop / 900) % 100; // Skip the read-order field ssa = strchr((char*)buf->data, ','); @@ -1181,9 +1181,10 @@ static int avformatMux(hb_mux_object_t *m, hb_mux_data_t *track, hb_buffer_t *bu if (ssa != NULL) ssa++; sprintf((char*)sub_out, - "Dialogue: %d,%d:%02d:%05.2f,%d:%02d:%05.2f,%s", layer, - start_hh, start_mm, start_ss, - stop_hh, stop_mm, stop_ss, ssa); + "Dialogue: %d,%d:%02d:%02d.%02d,%d:%02d:%02d.%02d,%s", + layer, + start_hh, start_mm, start_ss, start_ms, + stop_hh, stop_mm, stop_ss, stop_ms, ssa); pkt.data = sub_out; pkt.size = strlen((char*)sub_out) + 1; } |