Commit 06a96cb0 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Allow NULL and empty tags.

parent a9f1daca
......@@ -109,6 +109,7 @@ void ms_factory_set_cpu_count(MSFactory *obj, unsigned int c) {
}
void ms_factory_add_platform_tag(MSFactory *obj, const char *tag) {
if ((tag == NULL) || (tag[0] == '\0')) return;
if (ms_list_find_custom(obj->platform_tags, (MSCompareFunc)strcasecmp, tag) == NULL) {
obj->platform_tags = ms_list_append(obj->platform_tags, ms_strdup(tag));
}
......
......@@ -70,8 +70,10 @@ static MSVideoPreset * find_video_preset(MSVideoPresetsManager *manager, const c
static MSList * parse_tags(const char *tags) {
MSList *tags_list = NULL;
char *t = ms_strdup(tags);
char *p = t;
char *t;
char *p;
if ((tags == NULL) || (tags[0] != '\0')) return NULL;
p = t = ms_strdup(tags);
while (p != NULL) {
char *next = strstr(p, ",");
if (next != NULL) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment