mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-08 17:11:08 +00:00
The return value of MoveFileExW was not being correctly interpreted, see https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-movefileexw. On Windows a failed rename over the file: protocol now surfaces as failed to rename file %s to %s: Operation not permitted (ff_rename, libavformat/avio.c:867) plus an AVERROR(EPERM) return, where previously the muxer reported success and the user was left with a missing or stale output file and no diagnostic. This affects the write-to-temp-then-rename paths in hlsenc, dashenc, hdsenc, smoothstreamingenc, segment, and img2enc (e.g. HLS/DASH playlist updates, -write_temp_file, segment list finalization). Also, added unit tests to exercise the rename function. Signed-off-by: Christopher Decker <chris.decker08@gmail.com>