forked from bartvdbraak/blender
Orange:
- Missing free in AVI writing - time counter for animation render wasn't reset to zero on successive renders.
This commit is contained in:
parent
9da8961513
commit
1cde5efa3d
@ -44,6 +44,7 @@
|
||||
#include <stdio.h>
|
||||
#include "AVI_avi.h"
|
||||
#include "endian.h"
|
||||
#include "avi_intern.h"
|
||||
|
||||
#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__BIG_ENDIAN__)
|
||||
#define WORDS_BIGENDIAN
|
||||
@ -165,7 +166,7 @@ void awrite (AviMovie *movie, void *datain, int block, int size, FILE *fp, int t
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
void *data;
|
||||
|
||||
data = malloc (size);
|
||||
data = MEM_mallocN (size, "avi endian");
|
||||
|
||||
memcpy (data, datain, size);
|
||||
|
||||
@ -208,7 +209,7 @@ void awrite (AviMovie *movie, void *datain, int block, int size, FILE *fp, int t
|
||||
break;
|
||||
}
|
||||
|
||||
free (data);
|
||||
MEM_freeN (data);
|
||||
#else /* WORDS_BIGENDIAN */
|
||||
fwrite (datain, block, size, fp);
|
||||
#endif /* WORDS_BIGENDIAN */
|
||||
|
@ -775,6 +775,9 @@ static void do_render_fields(Render *re)
|
||||
|
||||
static void do_render_final(Render *re, Scene *scene)
|
||||
{
|
||||
/* we set start time here, for main Blender loops */
|
||||
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");
|
||||
if(!re->test_break())
|
||||
@ -952,11 +955,15 @@ void RE_BlenderAnim(Render *re, Scene *scene, int sfra, int efra)
|
||||
|
||||
/* write movie or image */
|
||||
if(BKE_imtype_is_movie(scene->r.imtype)) {
|
||||
/* 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");
|
||||
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);
|
||||
printf("Append frame %d", scene->r.cfra);
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user