libobs: Add array check for deinterlace logic

Seeing a rare assert on startup for a media source with deinterlacing
already on. Tested with Yadif 2x. Repro is maybe 10% of OBS launches?
master
jpark37 2022-03-22 11:28:36 -07:00 committed by Jim
parent 13f2d7925f
commit dd86425559
1 changed files with 2 additions and 1 deletions

View File

@ -181,7 +181,8 @@ static inline void deinterlace_get_closest_frames(obs_source_t *s,
da_erase(s->async_frames, 0);
if (s->cur_async_frame->prev_frame) {
if ((s->async_frames.num > 0) &&
s->cur_async_frame->prev_frame) {
s->prev_async_frame = s->cur_async_frame;
s->cur_async_frame = s->async_frames.array[0];