diff options
author | Rodeo <[email protected]> | 2013-03-19 18:31:16 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2013-03-19 18:31:16 +0000 |
commit | fd9089288f0644a4ce568b2e17abffebffeb65db (patch) | |
tree | 92cc20e348f69b501f5159ee6b7f1c779a00a279 | |
parent | c99843481a02e864f7deaaa36b9f10659d0829b9 (diff) |
muxmp4: map '\r\n' and '\r' to '\n'.
Improves Apple compatibility and avoids double linebreaks in e.g. VLC.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5349 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/muxmp4.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c index a6444ea14..fcd2bce5b 100644 --- a/libhb/muxmp4.c +++ b/libhb/muxmp4.c @@ -869,6 +869,11 @@ static void hb_muxmp4_process_subtitle_style( uint8_t *input, *writer++ = *reader++; break; } + } else if (*reader == '\r') { + // skip '\r' and replace with '\n' if necessary + if (*(++reader) != '\n') { + *writer++ = '\n'; + } } else { *writer++ = *reader++; } |