Skip to content

Commit

Permalink
image-source: Reload file when timestamp has changed
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
RytoEX committed Sep 14, 2016
1 parent 001f3c7 commit c8a81bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/image-source/image-source.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit c8a81bb

Please sign in to comment.