From fd9089288f0644a4ce568b2e17abffebffeb65db Mon Sep 17 00:00:00 2001 From: Rodeo Date: Tue, 19 Mar 2013 18:31:16 +0000 Subject: 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 --- libhb/muxmp4.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libhb/muxmp4.c') 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++; } -- cgit v1.2.3