diff --git a/plugins/obs-ffmpeg/obs-ffmpeg-source.c b/plugins/obs-ffmpeg/obs-ffmpeg-source.c index 666be13d0..e7a96f6af 100644 --- a/plugins/obs-ffmpeg/obs-ffmpeg-source.c +++ b/plugins/obs-ffmpeg/obs-ffmpeg-source.c @@ -258,10 +258,11 @@ static void media_stopped(void *opaque) struct ffmpeg_source *s = opaque; if (s->is_clear_on_media_end) { obs_source_output_video(s->source, NULL); - if (s->close_when_inactive && s->media_valid) - s->destroy_media = true; } + if (s->close_when_inactive && s->media_valid) + s->destroy_media = true; + set_media_state(s, OBS_MEDIA_STATE_ENDED); obs_source_media_ended(s->source); }