Commit 2a267019 authored by Gildas Bazin's avatar Gildas Bazin

* modules/codec/dmo/dmo.c: fixed problem with detection of DMOs.

parent 6a4fd20e
...@@ -604,31 +604,33 @@ static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll, ...@@ -604,31 +604,33 @@ static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll,
} }
/* Pickup the first available codec */ /* Pickup the first available codec */
if( p_enum_dmo->vt->Next( p_enum_dmo, 1, &clsid_dmo, *pp_dmo = 0;
&psz_dmo_name, &i_dummy /* NULL doesn't work */ ) ) while( ( S_OK == p_enum_dmo->vt->Next( p_enum_dmo, 1, &clsid_dmo,
{ &psz_dmo_name, &i_dummy /* NULL doesn't work */ ) ) )
FreeLibrary( *p_hmsdmo_dll );
return VLC_EGENERIC;
}
p_enum_dmo->vt->Release( (IUnknown *)p_enum_dmo );
#if 1
{ {
char psz_temp[MAX_PATH]; char psz_temp[MAX_PATH];
wcstombs( psz_temp, psz_dmo_name, MAX_PATH ); wcstombs( psz_temp, psz_dmo_name, MAX_PATH );
msg_Dbg( p_this, "found DMO: %s", psz_temp ); msg_Dbg( p_this, "found DMO: %s", psz_temp );
CoTaskMemFree( psz_dmo_name );
/* Create DMO */
if( CoCreateInstance( &clsid_dmo, NULL, CLSCTX_INPROC,
&IID_IMediaObject, (void **)pp_dmo ) )
{
msg_Warn( p_this, "can't create DMO: %s", psz_temp );
*pp_dmo = 0;
}
else break;
} }
#endif
CoTaskMemFree( psz_dmo_name ); p_enum_dmo->vt->Release( (IUnknown *)p_enum_dmo );
/* Create DMO */ if( !*pp_dmo )
if( CoCreateInstance( &clsid_dmo, NULL, CLSCTX_INPROC,
&IID_IMediaObject, (void **)pp_dmo ) )
{ {
msg_Err( p_this, "can't create DMO" );
FreeLibrary( *p_hmsdmo_dll ); FreeLibrary( *p_hmsdmo_dll );
return VLC_EGENERIC; /* return VLC_EGENERIC; */
/* Try loading the dll directly */
goto loader;
} }
return VLC_SUCCESS; return VLC_SUCCESS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment