summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libhb/decsrtsub.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libhb/decsrtsub.c b/libhb/decsrtsub.c
index 5854138a3..e0e0f2d2b 100644
--- 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';