aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpcodecs/ve_qtvideo.c
diff options
context:
space:
mode:
authorGravatar faust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-01-17 20:57:48 +0000
committerGravatar faust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-01-17 20:57:48 +0000
commit97372dab4f0c500cfef3522b5359a313dfa627ca (patch)
tree5109ac48adad4d1487f654abdeebc325dbc78d52 /libmpcodecs/ve_qtvideo.c
parent21dd8f38b9507a44ac5b495022d9a03e9a194f12 (diff)
preload quicktime.qts, this allows us to ignore the hardcoded path inside the dlls so that quicktime.qts doesn't need to be in the windows system dir, patch by Gianluigi Tiesi <mplayer at netfarm.it>, comments by myself
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14529 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/ve_qtvideo.c')
-rw-r--r--libmpcodecs/ve_qtvideo.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libmpcodecs/ve_qtvideo.c b/libmpcodecs/ve_qtvideo.c
index be10d86942..ead04fd123 100644
--- a/libmpcodecs/ve_qtvideo.c
+++ b/libmpcodecs/ve_qtvideo.c
@@ -34,6 +34,7 @@
HMODULE WINAPI LoadLibraryA(LPCSTR);
FARPROC WINAPI GetProcAddress(HMODULE,LPCSTR);
int WINAPI FreeLibrary(HMODULE);
+static HINSTANCE qtime_qts; //handle to preloaded quicktime.qts
static HMODULE handler;
static OSErr (*FindCodec)(CodecType cType,
@@ -296,6 +297,13 @@ static int vf_open(vf_instance_t *vf, char* args){
#ifdef WIN32_LOADER
Setup_LDT_Keeper();
#endif
+ //preload quicktime.qts to avoid the problems caused by the hardcoded path inside the dll
+ qtime_qts = LoadLibraryA("QuickTime.qts");
+ if(!qtime_qts){
+ mp_msg(MSGT_MENCODER,MSGL_ERR,"unable to load QuickTime.qts\n" );
+ return 0;
+ }
+
handler = LoadLibraryA("qtmlClient.dll");
if(!handler){
mp_msg(MSGT_MENCODER,MSGL_ERR,"unable to load qtmlClient.dll\n");