]> git.sesse.net Git - vlc/blobdiff - modules/codec/dmo/dmo.c
* modules/codec/dmo/dmo.c: portability fix.
[vlc] / modules / codec / dmo / dmo.c
index ad366a8909ba3b23983d6871fbccc8db3575e247..21115a560886092df57004d01ef871a8dc54a919 100644 (file)
@@ -519,6 +519,11 @@ static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll,
     int i_err;
 
 #ifndef LOADER
+    long (STDCALL *OurDMOEnum)( const GUID *, uint32_t, uint32_t,
+                               const DMO_PARTIAL_MEDIATYPE *,
+                               uint32_t, const DMO_PARTIAL_MEDIATYPE *,
+                               IEnumDMO ** );
+
     IEnumDMO *p_enum_dmo = NULL;
     WCHAR *psz_dmo_name;
     GUID clsid_dmo;
@@ -549,11 +554,6 @@ static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll,
     }
 
 #ifndef LOADER
-    long (STDCALL *OurDMOEnum)( const GUID *, uint32_t, uint32_t,
-                               const DMO_PARTIAL_MEDIATYPE *,
-                               uint32_t, const DMO_PARTIAL_MEDIATYPE *,
-                               IEnumDMO ** );
-
     /* Load msdmo DLL */
     *p_hmsdmo_dll = LoadLibrary( "msdmo.dll" );
     if( *p_hmsdmo_dll == NULL )
@@ -1105,10 +1105,7 @@ static int EncoderSetVideoType( encoder_t *p_enc, IMediaObject *p_dmo )
     i_err = p_dmo->vt->SetOutputType( p_dmo, 0, &dmo_type, 0 );
 
     p_vih = (VIDEOINFOHEADER *)dmo_type.pbFormat;
-    p_enc->fmt_out.video.i_width = p_enc->fmt_in.video.i_width;
-    p_enc->fmt_out.video.i_height = p_enc->fmt_in.video.i_height;
-    p_enc->fmt_out.video.i_aspect = VOUT_ASPECT_FACTOR *
-      p_enc->fmt_out.video.i_width / p_enc->fmt_out.video.i_height;
+    p_enc->fmt_in.i_codec = VLC_FOURCC('I','4','2','0');
 
     DMOFreeMediaType( &dmo_type );
     if( i_err )
@@ -1136,7 +1133,8 @@ static int EncoderSetAudioType( encoder_t *p_enc, IMediaObject *p_dmo )
     fourcc_to_wf_tag( p_enc->fmt_out.i_codec, &i_tag );
     if( i_tag == 0 ) return VLC_EGENERIC;
 
-    p_enc->fmt_in.audio.i_bitspersample = 16; // Forced
+    p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE;
+    p_enc->fmt_in.audio.i_bitspersample = 16;
 
     /* We first need to choose an output type from the predefined
      * list of choices (we cycle through the list to select the best match) */