Skip to content

Commit

Permalink
obs-transitions: Fix stinger showing count for update during transition
Browse files Browse the repository at this point in the history
  • Loading branch information
exeldro committed Nov 12, 2024
1 parent 24ea557 commit 9b88255
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/obs-transitions/transition-stinger.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ static void stinger_update(void *data, obs_data_t *settings)
obs_data_set_bool(media_settings, "is_stinger", true);
obs_data_set_bool(media_settings, "is_track_matte", s->track_matte_enabled);

if (s->media_source && s->transitioning)
obs_source_remove_active_child(s->source, s->media_source);
obs_source_release(s->media_source);
struct dstr name;
dstr_init_copy(&name, obs_source_get_name(s->source));
Expand All @@ -87,6 +89,8 @@ static void stinger_update(void *data, obs_data_t *settings)
dstr_free(&name);
obs_data_release(media_settings);

if (s->media_source && s->transitioning)
obs_source_add_active_child(s->source, s->media_source);
int64_t point = obs_data_get_int(settings, "transition_point");

s->transition_point_is_frame = obs_data_get_int(settings, "tp_type") == TIMING_FRAME;
Expand Down Expand Up @@ -476,7 +480,7 @@ static bool stinger_audio_render(void *data, uint64_t *ts_out, struct obs_source
return false;
}

if (!obs_source_audio_pending(s->media_source)) {
if (s->media_source && !obs_source_audio_pending(s->media_source)) {
ts = obs_source_get_audio_timestamp(s->media_source);
if (!ts)
return false;
Expand Down

0 comments on commit 9b88255

Please sign in to comment.