vo_pp/text: fix CID 480256

This commit is contained in:
Martin Pulec
2025-04-10 12:25:26 +02:00
parent eea61b2604
commit fc257ff83d

View File

@@ -100,6 +100,8 @@ struct state_text {
MagickWand *wand_text;
};
static void text_done(void *state);
static bool text_get_property(void *state, int property, void *val, size_t *len)
{
UNUSED(state);
@@ -172,13 +174,13 @@ static void * text_init(const char *config) {
if(!s->text || strlen(s->text) == 0){
log_msg(LOG_LEVEL_ERROR, "[text] Text can not be empty!\n");
free(s);
text_done(s);
return NULL;
}
if (s->req_h < -1) {
log_msg(LOG_LEVEL_ERROR, "[text] Text height cannot be negative!\n");
free(s);
text_done(s);
return NULL;
}