You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: image-source: an image replaced within the same second is still missed on Windows (follow-up to #548) #564
Follow-up to #548 (our fix for upstream obsproject/obs-studio#10700, reported by chocobclyn on Windows 11): #548 only covers Linux and macOS for images replaced by one of the same size.
What is left
#548 made the Image source compare the sub-second part of its file's modification time and the file size, so an image replaced within the same second is reloaded. The sub-second part comes from stat() on Linux and macOS. On Windows, libobs's os_stat() copies _wstat()'s st_mtime, whole seconds only, so there an image replaced by one of the same size within the same second is still missed and the old image stays on screen. The reporter is on Windows.
Our own incomplete fix (OUR MESS): the original bug remains on the reporter's platform for same-size replacements.
Proposed fix and failing test
Fix: on Windows, read the last write time and size with GetFileAttributesExW() (100 ns ticks) in a Windows-only image-file-version-win32.c, converted by a plain image_file_version_from_filetime(); Linux and macOS keep stat().
RED test (test_image_file_version_filetime, every platform, no graphics): two write times 0.4 s apart in the same second must give different versions, and the sub-second part must be kept to the 100 ns tick (both fail today: whole seconds only); controls: whole seconds convert to the Unix time stat() reports, and a real file is read (on Windows through the new code, so the Windows Tier 2 lane compiles and runs it).
Not run on Windows: we have no Windows machine. The conversion is tested on Linux; the Windows file was only checked for syntax against the documented Win32 declarations, and CI's Windows Tier 2 lane will be its first real build and run.
RED: test_image_file_version_filetime (2 of 4 failing): a Windows file time keeps whole seconds only.
GREEN: read the last write time with GetFileAttributesExW() on Windows (image-file-version-win32.c); Linux and macOS unchanged.
PR today. Not run on Windows here; the Windows Tier 2 lane builds and runs the new code.
Activity
rdoupe commentedon Oct 13, 2026
Claiming: this issue.
test_image_file_version_filetime(2 of 4 failing): a Windows file time keeps whole seconds only.PR today. Not run on Windows here; the Windows Tier 2 lane builds and runs the new code.
test/cmocka: Add failing test for the image file time on Windows
image-source: Read the sub-second file time on Windows too
test/cmocka: Add failing test for the image file time on Windows
image-source: Read the sub-second file time on Windows too
image-source: Read the sub-second file time on Windows too (obs-rust#565