{
long length;
char *p, *q;
- int line = 1;
uint64_t start_time = ( pv->current_entry.start +
pv->subtitle->config.offset ) * 90;
uint64_t stop_time = ( pv->current_entry.stop +
for (q = p = pv->current_entry.text; *p != '\0'; p++)
{
- if (*p == '\n' || *p == '\r')
+ if (*p == '\r')
{
if (*(p + 1) == '\n' || *(p + 1) == '\r' ||
*(p + 1) == '\0')
length--;
continue;
}
- else if (line == 1)
- {
- // replace '\r' with '\n'
- *q = '\n';
- line = 2;
- }
- else
- {
- // all subtitles on two lines tops
- // replace line breaks with spaces
- *q = ' ';
- }
+ // replace '\r' with '\n'
+ *q = '\n';
q++;
}
else
{
long length;
char *p, *q;
- int line = 1;
uint64_t start_time = ( pv->current_entry.start +
pv->subtitle->config.offset ) * 90;
uint64_t stop_time = ( pv->current_entry.stop +
for (q = p = pv->current_entry.text; *p != '\0'; p++)
{
- if (*p == '\n' || *p == '\r')
+ if (*p == '\r')
{
if (*(p + 1) == '\n' || *(p + 1) == '\r' || *(p + 1) == '\0')
{
length--;
continue;
}
- else if (line == 1)
- {
- // replace '\r' with '\n'
- *q = '\n';
- line = 2;
- }
- else
- {
- // all subtitles on two lines tops
- // replace line breaks with spaces
- *q = ' ';
- }
+ // replace '\r' with '\n'
+ *q = '\n';
q++;
}
else