git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4d6b4f3
)
added avifile_initialized flag.
author
kramm
<kramm>
Mon, 20 Sep 2004 16:15:59 +0000
(16:15 +0000)
committer
kramm
<kramm>
Mon, 20 Sep 2004 16:15:59 +0000
(16:15 +0000)
avi2swf/videoreader_vfw.cc
patch
|
blob
|
history
diff --git
a/avi2swf/videoreader_vfw.cc
b/avi2swf/videoreader_vfw.cc
index
2c2f809
..
2da5acd
100644
(file)
--- a/
avi2swf/videoreader_vfw.cc
+++ b/
avi2swf/videoreader_vfw.cc
@@
-223,13
+223,16
@@
void videoreader_vfw_close(videoreader_t* vr)
AVIStreamRelease(i->as); i->vs = 0;
}
AVIFileRelease(i->avifile); i->avifile = 0;
AVIStreamRelease(i->as); i->vs = 0;
}
AVIFileRelease(i->avifile); i->avifile = 0;
- AVIFileExit();
+
+ AVIFileExit(); avifile_initialized=0;
free(vr->internal); vr->internal = 0;
}
void videoreader_vfw_setparameter(videoreader_t* vr, char*name, char*value) {}
free(vr->internal); vr->internal = 0;
}
void videoreader_vfw_setparameter(videoreader_t* vr, char*name, char*value) {}
+static int avifile_initialized = 0;
+
int videoreader_vfw_open(videoreader_t* vr, char* filename)
{
memset(vr, 0, sizeof(videoreader_t));
int videoreader_vfw_open(videoreader_t* vr, char* filename)
{
memset(vr, 0, sizeof(videoreader_t));
@@
-248,7
+251,9
@@
int videoreader_vfw_open(videoreader_t* vr, char* filename)
vr->close = videoreader_vfw_close;
vr->setparameter = videoreader_vfw_setparameter;
vr->close = videoreader_vfw_close;
vr->setparameter = videoreader_vfw_setparameter;
- AVIFileInit();
+ if(!avifile_initialized) {
+ AVIFileInit();
+ }
if(AVIFileOpen(&i->avifile, filename, OF_SHARE_DENY_WRITE, 0)) {
fprintf(stderr, "Couldn't open %s\n", filename);
return -1;
if(AVIFileOpen(&i->avifile, filename, OF_SHARE_DENY_WRITE, 0)) {
fprintf(stderr, "Couldn't open %s\n", filename);
return -1;