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..b144aaa 100644 --- a/libavcodec/htmlsubtitles.c +++ b/libavcodec/htmlsubtitles.c @@ -62,6 +62,9 @@ int ff_htmlmarkup_to_ass(void *log_ctx, AVBPrint *dst, const char *in) strcpy(stack[0].param[PARAM_COLOR], "{\\c}"); strcpy(stack[0].param[PARAM_FACE], "{\\fn}"); + while (*in && (*in == '\r' || *in == '\n')) + in++; + for (; !end && *in; in++) { switch (*in) { case '\r': -- 2.7.4 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel