diff --git a/src/lib_ccx/ocr.c b/src/lib_ccx/ocr.c index 78d020cf..37a23dae 100644 --- a/src/lib_ccx/ocr.c +++ b/src/lib_ccx/ocr.c @@ -652,7 +652,6 @@ char *ocr_bitmap(void *arg, png_color *palette, png_byte *alpha, unsigned char * char *font_tag = line_start; while (1) { - font_tag = strstr(font_tag + 1, " line_end) break; @@ -660,8 +659,9 @@ char *ocr_bitmap(void *arg, png_color *palette, png_byte *alpha, unsigned char * } last_font_tag_end = strstr(last_font_tag, ">"); if (last_font_tag_end) + { last_font_tag_end += 1; // move string to the "right" if ">" was found, otherwise leave empty string (solves #1084) - + } // Copy the content of the subtitle memcpy(new_text_out_iter, line_start, line_end - line_start); new_text_out_iter += line_end - line_start; @@ -670,7 +670,6 @@ char *ocr_bitmap(void *arg, png_color *palette, png_byte *alpha, unsigned char * if (line_end - line_start < length_closing_font || strncmp(line_start, closing_font, length_closing_font)) { - memcpy(new_text_out_iter, closing_font, length_closing_font); new_text_out_iter += length_closing_font; }