obs-ffmpeg: Clear texture when starting playback

This prevents a stale texture from being visible for a single frame when
there is no preloaded video.
This commit is contained in:
Richard Stanway
2020-07-23 23:56:30 +02:00
parent 4f7767111a
commit 80803aa2f7

View File

@@ -317,9 +317,10 @@ static void ffmpeg_source_start(struct ffmpeg_source *s)
return;
mp_media_play(&s->media, s->is_looping, s->reconnecting);
if (s->is_local_file)
if (s->is_local_file && (s->is_clear_on_media_end || s->is_looping))
obs_source_show_preloaded_video(s->source);
else
obs_source_output_video(s->source, NULL);
set_media_state(s, OBS_MEDIA_STATE_PLAYING);
obs_source_media_started(s->source);
}