Browse Source

obs-transitions: Set stinger media source's name

Matt Gajownik 5 years ago
parent
commit
56d25fe6a8
1 changed files with 6 additions and 1 deletions
  1. 6 1
      plugins/obs-transitions/transition-stinger.c

+ 6 - 1
plugins/obs-transitions/transition-stinger.c

@@ -1,4 +1,5 @@
 #include <obs-module.h>
+#include <util/dstr.h>
 
 #define TIMING_TIME 0
 #define TIMING_FRAME 1
@@ -46,8 +47,12 @@ static void stinger_update(void *data, obs_data_t *settings)
 	obs_data_set_string(media_settings, "local_file", path);
 
 	obs_source_release(s->media_source);
-	s->media_source = obs_source_create_private("ffmpeg_source", NULL,
+	struct dstr name;
+	dstr_init_copy(&name, obs_source_get_name(s->source));
+	dstr_cat(&name, " (Stinger)");
+	s->media_source = obs_source_create_private("ffmpeg_source", name.array,
 						    media_settings);
+	dstr_free(&name);
 	obs_data_release(media_settings);
 
 	int64_t point = obs_data_get_int(settings, "transition_point");