obs-ffmpeg: Don't preload media frames if set to pause on end

Preloading is designed to overwrite the current internal render texture
of the source so it'll be ready to play the first frame right when the
source is first displayed.

However, When the media source is set to pause on the last frame, it
keeps that current render texture visible, so preloading it with the
first frame will essentially overwrite the current render, causing it to
inadvertently show and pause on the first frame rather than the last
frame.  So instead, just disable preloading when the user has it set to
pause on the last frame.
master
jp9000 2017-06-14 08:30:44 -07:00
parent d5adfff978
commit 054148a0af
1 changed files with 2 additions and 1 deletions

View File

@ -218,7 +218,8 @@ static void get_frame(void *opaque, struct obs_source_frame *f)
static void preload_frame(void *opaque, struct obs_source_frame *f)
{
struct ffmpeg_source *s = opaque;
obs_source_preload_video(s->source, f);
if (s->is_clear_on_media_end || s->is_looping)
obs_source_preload_video(s->source, f);
}
static void get_audio(void *opaque, struct obs_source_audio *a)