Author: reimar Date: Sat Jan 28 15:51:29 2012 New Revision: 34637 Log: Do not try to render \r. Sample: http://samples.mplayerhq.hu/sub/fribidi/fribidi_arabic_hebrew_subs.mkv with -sid 0. Modified: trunk/libass/ass_render.c Modified: trunk/libass/ass_render.c ============================================================================== --- trunk/libass/ass_render.c Sat Jan 28 15:24:59 2012 (r34636) +++ trunk/libass/ass_render.c Sat Jan 28 15:51:29 2012 (r34637) @@ -683,6 +683,8 @@ blend_vector_exit: render_priv->state.clip_drawing = 0; } +#define SKIP_SYMBOL(x) ((x) == 0 || (x) == '\n' || (x) == '\r') + /** * \brief Convert TextInfo struct to ASS_Image list * Splits glyphs in halves when needed (for \kf karaoke). @@ -700,7 +702,7 @@ static ASS_Image *render_text(ASS_Render for (i = 0; i < text_info->length; ++i) { GlyphInfo *info = text_info->glyphs + i; - if ((info->symbol == 0) || (info->symbol == '\n') || !info->bm_s + if (SKIP_SYMBOL(info->symbol) || !info->bm_s || (info->shadow_x == 0 && info->shadow_y == 0) || info->skip) continue; @@ -734,7 +736,7 @@ static ASS_Image *render_text(ASS_Render last_tail = 0; for (i = 0; i < text_info->length; ++i) { GlyphInfo *info = text_info->glyphs + i; - if ((info->symbol == 0) || (info->symbol == '\n') || !info->bm_o + if (SKIP_SYMBOL(info->symbol) || !info->bm_o || info->skip) continue; @@ -767,7 +769,7 @@ static ASS_Image *render_text(ASS_Render for (i = 0; i < text_info->length; ++i) { GlyphInfo *info = text_info->glyphs + i; - if ((info->symbol == 0) || (info->symbol == '\n') || !info->bm + if (SKIP_SYMBOL(info->symbol) || !info->bm || info->skip) continue;
participants (1)
-
reimar