From c8a81bba7255362efff16d6be53d937ff1bf8066 Mon Sep 17 00:00:00 2001 From: Ryan Foster Date: Wed, 14 Sep 2016 05:43:48 -0400 Subject: [PATCH] image-source: Reload file when timestamp has changed This commit fixes the issue outlined in the following thread: https://obsproject.com/forum/threads/50045/ When the image source file was replaced by an outside process, it would only reload when the file's new timestamp was newer than the file's previous timestamp. This fixes that behavior. Now an image source will reload any time the file's new timestamp is different than its previous timestamp. --- plugins/image-source/image-source.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/image-source/image-source.c b/plugins/image-source/image-source.c index 91ced6c4d..5986edddc 100644 --- a/plugins/image-source/image-source.c +++ b/plugins/image-source/image-source.c @@ -207,7 +207,7 @@ static void image_source_tick(void *data, float seconds) time_t t = get_modified_timestamp(context->file); context->update_time_elapsed = 0.0f; - if (context->file_timestamp < t) { + if (context->file_timestamp != t) { image_source_load(context); } }