diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-23 14:18:10 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-23 14:18:10 +0400 |
commit | 4662e40bfa3f8a35a73ac42029e3da5ef280d86d (patch) | |
tree | 498aa885d425b10838259774245bb1e17dcfd95c | |
parent | d881bb4b32d1dff089b6f8c61d0f0fdd16d2b82b (diff) |
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.
-rw-r--r-- | source/blender/imbuf/IMB_imbuf.h | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/indexer.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index 9d21cc6d8d9..5f38142726f 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -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 { diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c index ade63aa1e9c..f36db61f27a 100644 --- a/source/blender/imbuf/intern/indexer.c +++ b/source/blender/imbuf/intern/indexer.c @@ -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); } } |