Skip to content

Commit

Permalink
obs-transitions: Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
jpark37 authored and jp9000 committed May 2, 2021
1 parent 8ec73ae commit 091bdb9
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions plugins/obs-transitions/transition-stinger.c
Expand Up @@ -268,24 +268,15 @@ static void stinger_video_render(void *data, gs_effect_t *effect)

/* --------------------- */

float cx = (float)obs_source_get_width(s->source);
float cy = (float)obs_source_get_height(s->source);
const uint32_t cx = obs_source_get_width(s->source);
const uint32_t cy = obs_source_get_height(s->source);

uint32_t media_cx = obs_source_get_width(s->media_source);
uint32_t media_cy = obs_source_get_height(s->media_source);
const uint32_t media_cx = obs_source_get_width(s->media_source);
const uint32_t media_cy = obs_source_get_height(s->media_source);

if (!media_cx || !media_cy)
return;

float scale_x, scale_y;
if (s->track_matte_enabled) {
scale_x = cx / ((float)media_cx / s->matte_width_factor);
scale_y = cy / ((float)media_cy / s->matte_height_factor);
} else {
scale_x = cx / (float)media_cx;
scale_y = cy / (float)media_cy;
}

// rendering the stinger media in an intermediary texture with the same size
// as the transition itself ensures that stacked and side-by-side files used with
// the Track Matte mode will only show their stinger side, and crop out the matte side
Expand Down

0 comments on commit 091bdb9

Please sign in to comment.