diff options
author | Ton Roosendaal <ton@blender.org> | 2006-02-03 12:25:46 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-02-03 12:25:46 +0300 |
commit | 7a7c33ea2713e06c1f9581838a3b2c0e8ce1f48c (patch) | |
tree | 906e9a5cd595e85524b0323069db2e081483ad4d | |
parent | 4b05af9ca75d1be1c49249f23bf9b4aa6ee4d549 (diff) |
Crash fix! Found one unsafe malloc in allocating the Z render pass...
Brought back threaded compositing, this was blamed incorrectly.
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 4ce098f7d27..e2dc623859e 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -1711,7 +1711,7 @@ void ntreeCompositExecTree(bNodeTree *ntree, RenderData *rd, int do_preview) if(ntree==NULL) return; if(rd->mode & R_THREADS) - maxthreads= 1; + maxthreads= 2; else maxthreads= 1; diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index a420702f84b..97e45abe596 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -177,11 +177,11 @@ static void free_render_result(RenderResult *res) static void render_layer_add_pass(RenderLayer *rl, int rectsize, int passtype, char *mallocstr) { - RenderPass *rpass= MEM_mallocN(sizeof(RenderPass), mallocstr); + RenderPass *rpass= RE_mallocN(sizeof(RenderPass), mallocstr); BLI_addtail(&rl->passes, rpass); rpass->passtype= passtype; - rpass->rect= MEM_callocN(sizeof(float)*rectsize, mallocstr); + rpass->rect= RE_callocN(sizeof(float)*rectsize, mallocstr); } float *RE_RenderLayerGetPass(RenderLayer *rl, int passtype) @@ -851,7 +851,7 @@ static void do_render_final(Render *re, Scene *scene) re->i.starttime= PIL_check_seconds_timer(); if(re->r.scemode & R_DOSEQ) { - re->result->rect32= MEM_callocN(sizeof(int)*re->rectx*re->recty, "rectot"); + re->result->rect32= RE_callocN(sizeof(int)*re->rectx*re->recty, "rectot"); if(!re->test_break()) do_render_seq(re->result); } @@ -1038,12 +1038,12 @@ void RE_BlenderAnim(Render *re, Scene *scene, int sfra, int efra) /* note; the way it gets 32 bits rects is weak... */ int dofree=0; if(rres.rect32==NULL) { - rres.rect32= MEM_mallocN(sizeof(int)*rres.rectx*rres.recty, "temp 32 bits rect"); + rres.rect32= RE_mallocN(sizeof(int)*rres.rectx*rres.recty, "temp 32 bits rect"); dofree= 1; } RE_ResultGet32(re, rres.rect32); mh->append_movie(scene->r.cfra, rres.rect32, rres.rectx, rres.recty); - if(dofree) MEM_freeN(rres.rect32); + if(dofree) RE_freeN(rres.rect32); printf("Append frame %d", scene->r.cfra); } else { |