obs-ffmpeg: Don't mark to destroy media unless valid

Closes jp9000/obs-studio#1021
master
chinasarft 2017-09-07 11:34:06 +08:00 committed by jp9000
parent dcd3e627c2
commit 1ef4de7ce3
1 changed files with 1 additions and 1 deletions

View File

@ -232,7 +232,7 @@ 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)
if (s->close_when_inactive && s->media_valid)
s->destroy_media = true;
}
}