projects
/
handbrake
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2526e89
)
libhb: fix utf8/srt sub line ending parsing
author
jstebbins
<jstebbins.hb@gmail.com>
Mon, 15 Sep 2014 18:40:32 +0000
(18:40 +0000)
committer
jstebbins
<jstebbins.hb@gmail.com>
Mon, 15 Sep 2014 18:40:32 +0000
(18:40 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6408
b64f7644
-9d1e-0410-96f1-
a4d463321fa5
libhb/decsrtsub.c
patch
|
blob
|
history
diff --git
a/libhb/decsrtsub.c
b/libhb/decsrtsub.c
index 5854138a38ece8ccc24f752fdd85e67dfa6e37d3..e0e0f2d2be54c8cc68ff208ffedbef2242e03901 100644
(file)
--- a/
libhb/decsrtsub.c
+++ b/
libhb/decsrtsub.c
@@
-178,7
+178,17
@@
void hb_srt_to_ssa(hb_buffer_t *sub_in, int line)
hb_buffer_realloc(sub_in, pos + 4);
// After realloc, sub_in->data may change
ssa = (char*)sub_in->data;
- if (srt[ii] == '\n')
+ if (srt[ii] == '\r')
+ {
+ ssa[pos++] = '\\';
+ ssa[pos++] = 'N';
+ ii++;
+ if (srt[ii] == '\n')
+ {
+ ii++;
+ }
+ }
+ else if (srt[ii] == '\n')
{
ssa[pos++] = '\\';
ssa[pos++] = 'N';