diff --git a/plugins/image-source/image-source.c b/plugins/image-source/image-source.c index dd9b9300c..a6540065e 100644 --- a/plugins/image-source/image-source.c +++ b/plugins/image-source/image-source.c @@ -306,28 +306,16 @@ static const char *image_filter = static obs_properties_t *image_source_properties(void *data) { - struct image_source *s = data; - struct dstr path = {0}; + UNUSED_PARAMETER(data); obs_properties_t *props = obs_properties_create(); - if (s && s->file && *s->file) { - const char *slash; - - dstr_copy(&path, s->file); - dstr_replace(&path, "\\", "/"); - slash = strrchr(path.array, '/'); - if (slash) - dstr_resize(&path, slash - path.array + 1); - } - obs_properties_add_path(props, "file", obs_module_text("File"), - OBS_PATH_FILE, image_filter, path.array); + OBS_PATH_FILE, image_filter, NULL); obs_properties_add_bool(props, "unload", obs_module_text("UnloadWhenNotShowing")); obs_properties_add_bool(props, "linear_alpha", obs_module_text("LinearAlpha")); - dstr_free(&path); return props; } diff --git a/plugins/obs-filters/color-grade-filter.c b/plugins/obs-filters/color-grade-filter.c index 29a808d10..b15709e84 100644 --- a/plugins/obs-filters/color-grade-filter.c +++ b/plugins/obs-filters/color-grade-filter.c @@ -382,7 +382,7 @@ static void color_grade_filter_defaults(obs_data_t *settings) static obs_properties_t *color_grade_filter_properties(void *data) { - struct lut_filter_data *s = data; + UNUSED_PARAMETER(data); struct dstr path = {0}; const char *slash; @@ -391,14 +391,10 @@ static obs_properties_t *color_grade_filter_properties(void *data) dstr_cat(&filter_str, "PNG/Cube (*.cube *.png)"); - if (s && s->file && *s->file) { - dstr_copy(&path, s->file); - } else { - char *lut_dir = obs_module_file("LUTs"); - dstr_copy(&path, lut_dir); - dstr_cat_ch(&path, '/'); - bfree(lut_dir); - } + char *lut_dir = obs_module_file("LUTs"); + dstr_copy(&path, lut_dir); + dstr_cat_ch(&path, '/'); + bfree(lut_dir); dstr_replace(&path, "\\", "/"); slash = strrchr(path.array, '/');