Fix #30315: Temporary proxy files are not erased and old proxys are not updated if the proxy is built more then once (windows)
Two issues are fixed here: - On windows rename() doesn't actually renames file if destination file is already exist. Solved by ulinking previously built proxy/timecode. - IMB_TC_MAX_SLOT was set to incorrect value leading to record run timecode calculating several times.
This commit is contained in:
@@ -199,7 +199,7 @@ typedef enum IMB_Timecode_Type {
|
||||
device (*every* consumer camcorder can do
|
||||
that :) )*/
|
||||
IMB_TC_RECORD_RUN_NO_GAPS = 8,
|
||||
IMB_TC_MAX_SLOT = 8
|
||||
IMB_TC_MAX_SLOT = 4
|
||||
} IMB_Timecode_Type;
|
||||
|
||||
typedef enum IMB_Proxy_Size {
|
||||
|
||||
@@ -147,6 +147,7 @@ void IMB_index_builder_finish(anim_index_builder * fp, int rollback)
|
||||
if (rollback) {
|
||||
unlink(fp->temp_name);
|
||||
} else {
|
||||
unlink(fp->name);
|
||||
rename(fp->temp_name, fp->name);
|
||||
}
|
||||
|
||||
@@ -687,6 +688,7 @@ static void free_proxy_output_ffmpeg(struct proxy_output_ctx * ctx,
|
||||
} else {
|
||||
get_proxy_filename(ctx->anim, ctx->proxy_size,
|
||||
fname, FALSE);
|
||||
unlink(fname);
|
||||
rename(fname_tmp, fname);
|
||||
}
|
||||
|
||||
@@ -1043,6 +1045,7 @@ static void index_rebuild_fallback(struct anim * anim,
|
||||
if (*stop) {
|
||||
unlink(fname_tmp);
|
||||
} else {
|
||||
unlink(fname);
|
||||
rename(fname_tmp, fname);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user