Re: [FFmpeg-devel] [PATCH] libavcodec/htmlsubtitles: skip newline characters at the beginning of the subtitle

2017-06-20 Thread wm4
On Fri, 16 Jun 2017 23:40:32 +0300 Evgeny Shulgin wrote: > > Anyway, I don't understand why this makes subtitle lines actually > > disappear? > > Because SubRip format does not allow to have empty lines, that is: > >1. Subtitle text itself on one or more lines >2. A blank line contain

Re: [FFmpeg-devel] [PATCH] libavcodec/htmlsubtitles: skip newline characters at the beginning of the subtitle

2017-06-16 Thread Evgeny Shulgin
> Anyway, I don't understand why this makes subtitle lines actually > disappear? Because SubRip format does not allow to have empty lines, that is: 1. Subtitle text itself on one or more lines 2. A blank line containing no text, indicating the end of this subtitle So, when we have '\n' at

Re: [FFmpeg-devel] [PATCH] libavcodec/htmlsubtitles: skip newline characters at the beginning of the subtitle

2017-06-16 Thread wm4
On Fri, 16 Jun 2017 21:30:44 +0300 Evgeny Shulgin wrote: > Info about this patch: > > Working with one video, I noticed that ffmpeg incorrectly extracts out > subtitles. Some subtitles have disappeared. > I have a video file as Matroska (.mkv) container, subtitles are there in > the SubRip (.srt

Re: [FFmpeg-devel] [PATCH] libavcodec/htmlsubtitles: skip newline characters at the beginning of the subtitle

2017-06-16 Thread Evgeny Shulgin
Info about this patch: Working with one video, I noticed that ffmpeg incorrectly extracts out subtitles. Some subtitles have disappeared. I have a video file as Matroska (.mkv) container, subtitles are there in the SubRip (.srt) format. Output of `ffmpeg`: https://pastebin.com/raw/vyiMNFbe Output

[FFmpeg-devel] [PATCH] libavcodec/htmlsubtitles: skip newline characters at the beginning of the subtitle

2017-06-16 Thread Evgeny Shulgin
We can have a certain number of newline characters at the very beginning of the subtitles. We must skip them to get the correct result. --- libavcodec/htmlsubtitles.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/htmlsubtitles.c b/libavcodec/htmlsubtitles.c index 16295da..b144a