[cvs] / xvidcore / vfw / src / driverproc.c Repository:
ViewVC logotype

Diff of /xvidcore/vfw/src/driverproc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3, Fri Apr 2 21:29:21 2004 UTC revision 1.5, Wed May 26 05:23:03 2004 UTC
# Line 33  Line 33 
33  #include "status.h"  #include "status.h"
34  #include "resource.h"  #include "resource.h"
35    
36    static int clean_dll_bindings(CODEC* codec);
37    
38  BOOL WINAPI DllMain(  BOOL WINAPI DllMain(
39          HANDLE hModule,          HANDLE hModule,
# Line 112  Line 113 
113                  /* compress_end/decompress_end don't always get called */                  /* compress_end/decompress_end don't always get called */
114                  compress_end(codec);                  compress_end(codec);
115                  decompress_end(codec);                  decompress_end(codec);
116                    clean_dll_bindings(codec);
117          status_destroy_always(&codec->status);          status_destroy_always(&codec->status);
118                  free(codec);                  free(codec);
119                  return DRV_OK;                  return DRV_OK;
# Line 291  Line 293 
293          return ICERR_UNSUPPORTED;          return ICERR_UNSUPPORTED;
294    
295          default:          default:
296                    if (uMsg < DRV_USER)
297                  return DefDriverProc(dwDriverId, hDriver, uMsg, lParam1, lParam2);                  return DefDriverProc(dwDriverId, hDriver, uMsg, lParam1, lParam2);
298                    else
299                            return ICERR_UNSUPPORTED;
300          }          }
301  }  }
302    
   
303  void WINAPI Configure(HWND hwnd, HINSTANCE hinst, LPTSTR lpCmdLine, int nCmdShow)  void WINAPI Configure(HWND hwnd, HINSTANCE hinst, LPTSTR lpCmdLine, int nCmdShow)
304  {  {
305          DWORD dwDriverId;          DWORD dwDriverId;
# Line 307  Line 311 
311                  DriverProc(dwDriverId, 0, DRV_CLOSE, 0, 0);                  DriverProc(dwDriverId, 0, DRV_CLOSE, 0, 0);
312          }          }
313  }  }
314    
315    static int clean_dll_bindings(CODEC* codec)
316    {
317            if(codec->m_hdll)
318            {
319                    FreeLibrary(codec->m_hdll);
320                    codec->m_hdll = NULL;
321                    codec->xvid_global_func = NULL;
322                    codec->xvid_encore_func = NULL;
323                    codec->xvid_decore_func = NULL;
324                    codec->xvid_plugin_single_func = NULL;
325                    codec->xvid_plugin_2pass1_func = NULL;
326                    codec->xvid_plugin_2pass2_func = NULL;
327                    codec->xvid_plugin_lumimasking_func = NULL;
328                    codec->xvid_plugin_psnr_func = NULL;
329            }
330            return 0;
331    }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4