summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorRodeo <[email protected]>2013-05-08 22:02:05 +0000
committerRodeo <[email protected]>2013-05-08 22:02:05 +0000
commit53b756de48d6af01e3934cf04ecbc7e60810b5e8 (patch)
tree937e63cd590ed0f91c83861ac6c4088b7093c71c /libhb
parentd03eec7a91a06f76775bb863e892adbc87faea8d (diff)
Improve upon previous commit.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5447 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/decsrtsub.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libhb/decsrtsub.c b/libhb/decsrtsub.c
index 4a827f460..7664e1378 100644
--- a/libhb/decsrtsub.c
+++ b/libhb/decsrtsub.c
@@ -346,7 +346,8 @@ static hb_buffer_t *srt_read( hb_work_private_t *pv )
{
if (*p == '\n' || *p == '\r')
{
- if (*(p + 1) == '\n' || *(p + 1) == '\0')
+ if (*(p + 1) == '\n' || *(p + 1) == '\r' ||
+ *(p + 1) == '\0')
{
// followed by line break or last character, skip it
length--;
@@ -360,7 +361,7 @@ static hb_buffer_t *srt_read( hb_work_private_t *pv )
}
else
{
- // all subtitles on one line
+ // all subtitles on two lines tops
// replace line breaks with spaces
*q = ' ';
}
@@ -420,7 +421,7 @@ static hb_buffer_t *srt_read( hb_work_private_t *pv )
{
if (*p == '\n' || *p == '\r')
{
- if (*(p + 1) == '\n' || *(p + 1) == '\0')
+ if (*(p + 1) == '\n' || *(p + 1) == '\r' || *(p + 1) == '\0')
{
// followed by line break or last character, skip it
length--;
@@ -434,7 +435,7 @@ static hb_buffer_t *srt_read( hb_work_private_t *pv )
}
else
{
- // all subtitles on one line
+ // all subtitles on two lines tops
// replace line breaks with spaces
*q = ' ';
}