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

wm4 nfxjfg at googlemail.com
Fri Jun 16 22:57:54 EEST 2017


On Fri, 16 Jun 2017 21:30:44 +0300
Evgeny Shulgin <izaronplatz at gmail.com> 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) format.
> 
> Output of `ffmpeg`: https://pastebin.com/raw/vyiMNFbe
> Output of my Matroska parser:  https://pastebin.com/raw/8XsXkm0C
> Output of `mkvextract`: https://pastebin.com/raw/7K7nkwsd
> 
> When I open the .mkv file in VLC Player, these magical subtitles are
> displayed correctly.
> But of all the extracted subtitle files, only the second file works
> correctly (from my parser) in VLC, in other 2 files these subtitle lines
> have dissapeared.
> 
> Therefore, I suggest deleting the newline characters at the beginning of
> the line, and working on. FATE tests works without error.

Most of this should probably go into the commit message (without
pastebin links, and instead with excerpts of interesting subtitle
lines).

Anyway, I don't understand why this makes subtitle lines actually
disappear?


More information about the ffmpeg-devel mailing list