~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/blender/src/writeavicodec.c

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
2
 * Functions for writing windows avi-format files.
3
3
 *
4
 
 * $Id: writeavicodec.c,v 1.12 2004/01/13 14:50:45 phase Exp $
 
4
 * $Id: writeavicodec.c,v 1.15 2005/04/17 18:00:33 ton Exp $
5
5
 *
6
6
 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
7
7
 *
41
41
 
42
42
#define  INC_OLE2
43
43
#include <windows.h>
 
44
#undef rad1
 
45
#undef rad2
 
46
 
44
47
#include <windowsx.h>
45
48
#include <memory.h>
46
49
#include <mmsystem.h>
53
56
#include "DNA_userdef_types.h"
54
57
 
55
58
#include "render_types.h"
56
 
#include "render.h"
 
59
#include "render.h"                     // lotsof R. stuff
57
60
 
58
61
#include "BKE_global.h"
59
62
#include "BKE_scene.h"
561
564
                opts.cbParms = acd->cbParms;
562
565
                
563
566
                if (acd->lpFormat && acd->cbFormat) {
564
 
                        opts.lpFormat = malloc(opts.cbFormat);
 
567
                        opts.lpFormat = MEM_mallocN(opts.cbFormat, "opts lpFormat");
565
568
                        memcpy(opts.lpFormat, acd->lpFormat, opts.cbFormat);
566
569
                }
567
570
 
568
571
                if (acd->lpParms && acd->cbParms) {
569
 
                        opts.lpParms = malloc(opts.cbParms);
 
572
                        opts.lpParms = MEM_mallocN(opts.cbParms, "opts.cbParms");
570
573
                        memcpy(opts.lpParms, acd->lpParms, opts.cbParms);
571
574
                }
572
575
        }
575
578
static void free_opts_data()
576
579
{
577
580
        if (opts.lpFormat) {
578
 
                free(opts.lpFormat);
 
581
                MEM_freeN(opts.lpFormat);
579
582
                opts.lpFormat = NULL;
580
583
        }
581
584
        if (opts.lpParms) {
582
 
                free(opts.lpParms);
 
585
                MEM_freeN(opts.lpParms);
583
586
                opts.lpParms = NULL;
584
587
        }
585
588
}