Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Haarsma <phaseIV@zonnet.nl>2003-05-11 19:44:23 +0400
committerRob Haarsma <phaseIV@zonnet.nl>2003-05-11 19:44:23 +0400
commitfe05ca64f2209ff6025f2eadf2e129d8a103a95f (patch)
tree1963d16b4b8536af24433fd102c672588ed0ed21 /source/blender/src/writeavicodec.c
parenta204816f3fd65219044c51e8f9a8fbe488cb79ef (diff)
fixed a (wn32 avi) codec issue when adding an Empty scene.
added ttc and otc to the list of font extensions.
Diffstat (limited to 'source/blender/src/writeavicodec.c')
-rw-r--r--source/blender/src/writeavicodec.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/source/blender/src/writeavicodec.c b/source/blender/src/writeavicodec.c
index 95d69daaafb..1a72caae39a 100644
--- a/source/blender/src/writeavicodec.c
+++ b/source/blender/src/writeavicodec.c
@@ -64,8 +64,6 @@
// the output video stream
AVICOMPRESSOPTIONS opts;
-char avicdname[128];
-int have_avicodec= 0;
static int sframe;
static PAVIFILE pfile = NULL;
@@ -510,6 +508,9 @@ static void init_bmi(BITMAPINFOHEADER *bmi)
static void opts_to_acd(AviCodecData *acd)
{
+ HIC hic;
+ ICINFO icinfo;
+
acd->fccType = opts.fccType;
acd->fccHandler = opts.fccHandler;
acd->dwKeyFrameEvery = opts.dwKeyFrameEvery;
@@ -529,6 +530,18 @@ static void opts_to_acd(AviCodecData *acd)
acd->lpParms = MEM_mallocN(opts.cbParms, "avi.lpParms");
memcpy(acd->lpParms, opts.lpParms, opts.cbParms);
}
+
+ if ((hic=ICOpen(ICTYPE_VIDEO,acd->fccHandler,ICMODE_QUERY))!=NULL) {
+ icinfo.dwSize=sizeof(ICINFO);
+ if (ICGetInfo(hic,&icinfo,sizeof(ICINFO))) {
+ WideCharToMultiByte(CP_ACP,0,icinfo.szDescription,-1,acd->avicodecname,128,NULL,NULL);
+ } else
+ sprintf(acd->avicodecname, "undefined");
+ if (ICClose(hic)!=ICERR_OK)
+;// return 0;
+ } else {
+ sprintf(acd->avicodecname, "Full Frames (Uncompressed)"); //heh, nasty
+ }
}
@@ -769,8 +782,6 @@ int get_avicodec_settings(void)
AVICOMPRESSOPTIONS *aopts[1] = {&opts};
AviCodecData *acd = G.scene->r.avicodecdata;
static PAVISTREAM psdummy;
- HIC hic;
- ICINFO icinfo;
acd_to_opts(G.scene->r.avicodecdata);
@@ -788,20 +799,6 @@ int get_avicodec_settings(void)
{
ret_val = 1;
} else {
- have_avicodec = 1;
-
- if ((hic=ICOpen(ICTYPE_VIDEO,opts.fccHandler,ICMODE_QUERY))!=NULL) {
- icinfo.dwSize=sizeof(ICINFO);
- if (ICGetInfo(hic,&icinfo,sizeof(ICINFO))) {
- WideCharToMultiByte(CP_ACP,0,icinfo.szDescription,-1,avicdname,128,NULL,NULL);
- } else
- sprintf(avicdname, "undefined");
- if (ICClose(hic)!=ICERR_OK)
- return 0;
- } else {
- sprintf(avicdname, "Full Frames (Uncompressed)"); //heh, nasty
- }
-
if (acd) {
free_avicodecdata(acd);
} else {