Skip to content

Commit

Permalink
text.c: compilable with gcc and old ImageMagick
Browse files Browse the repository at this point in the history
  • Loading branch information
xsebela2 authored and mpiatka committed May 29, 2024
1 parent 183d9a2 commit 89e294c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/vo_postprocess/text.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ static void * text_init(const char *config) {
struct state_text *s;

if (strlen(config) == 0 || strcmp(config, "help") == 0) {
parsed_textspec_is_invalid:
parsed_textspec_is_invalid:;
char desc[] = TBOLD("text") " video postprocess takes as a parameter text to be drawed. "
"Colons in text must be escaped with a backslash (see Examples). Spaces may be escaped or the whole argument should be enclosed by quotation marks.\n";
"Colons in text must be escaped with a backslash (see Examples). Spaces may be escaped or the whole argument should be enclosed by quotation marks.\n";
color_printf("%s", wrap_paragraph(desc));
color_printf("\nUsage:\n");
color_printf("\t" TBOLD("-p text:<text>") "\n");
Expand Down Expand Up @@ -347,7 +347,11 @@ static bool text_postprocess(void *state, struct video_frame *in, struct video_f
}

// compose it with text
#ifdef WAND7
status = MagickCompositeImage(s->wand_bg, s->wand_text, OverCompositeOp, true, s->margin_x, 0);
#else
status = MagickCompositeImage(s->wand_bg, s->wand_text, OverCompositeOp, s->margin_x, 0);
#endif
if (status != MagickTrue) {
log_msg(LOG_LEVEL_WARNING, "[text vo_pp.] MagickCompositeImage failed!\n");
return false;
Expand Down

0 comments on commit 89e294c

Please sign in to comment.