0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00

Merge pull request #2351 from WizardCM/named-stinger-media

Set stinger media source's name
This commit is contained in:
Jim 2020-01-27 04:38:56 -08:00 committed by GitHub
commit d60fb8dcbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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");