From 67d5efd034c3cb746468dc37d8885aeacdf7f07c Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Fri, 21 Apr 2023 15:31:08 -0700 Subject: [PATCH] fix crash in count producer via xml producer regression in 1d63bd8 The xml consumer was serializing the mlt_producer default "resource" property value of "", which the xml producer would prepend with a root path. The loader producer would append the resource value to the service name delimited by a colon. That was then split and sent to the count producer's init function as an invalid argument to use for the factory producer. --- src/modules/plus/producer_count.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/plus/producer_count.c b/src/modules/plus/producer_count.c index 7f52c097e..102cdd0e3 100644 --- a/src/modules/plus/producer_count.c +++ b/src/modules/plus/producer_count.c @@ -645,8 +645,9 @@ mlt_producer producer_count_init(mlt_profile profile, mlt_properties_set(properties, "sound", "none"); mlt_properties_set(properties, "background", "clock"); mlt_properties_set(properties, "drop", "0"); + mlt_properties_clear(properties, "resource"); // Let the arg specify the producer to use with the factory, e.g. loader-nogl - if (arg && strcmp(arg, "") && strcmp(arg, "")) + if (arg && strcmp(arg, "")) mlt_properties_set(properties, FACTORY_PRODUCER, arg); // Callback registration