[MPlayer-dev-eng] [PATCH] Supporting DMO decoder from WMP11, multithreaded WMV3/VC1 decoding

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Mar 11 17:41:20 CET 2009


On Mon, Jan 12, 2009 at 05:46:16PM +0800, Zhou Zongyi wrote:
> Index: loader/dmo/dmo.c
> ===================================================================
> --- loader/dmo/dmo.c (revision 28306)
> +++ loader/dmo/dmo.c (working copy)
> @@ -139,6 +139,7 @@
>  */
>   }
>  
> + if (0!=memcmp(&GUID_NULL, &out_fmt->subtype, sizeof(GUID))){
>   hr = This->m_pMedia->vt->SetOutputType(This->m_pMedia, 0, out_fmt, 0);
>   if (hr)
>   {
> @@ -153,6 +154,7 @@
>   // This->m_pMedia->vt->AllocateStreamingResources(This->m_pMedia);
>   hr = This->m_pMedia->vt->GetStreamCount(This->m_pMedia, &inputs, &outputs);
>   Debug printf("StreamCount r=0x%lx  %ld  %ld\n", hr, inputs, outputs);
> + }
>  
>          break;
>      }
> Index: loader/dmo/DMO_VideoDecoder.c
> ===================================================================
> --- loader/dmo/DMO_VideoDecoder.c (revision 28306)
> +++ loader/dmo/DMO_VideoDecoder.c (working copy)
> @@ -152,7 +152,7 @@
>  
>   memset(&this->m_sDestType, 0, sizeof(this->m_sDestType));
>   this->m_sDestType.majortype = MEDIATYPE_Video;
> - this->m_sDestType.subtype = MEDIASUBTYPE_RGB24;
> + this->m_sDestType.subtype = GUID_NULL;
>   this->m_sDestType.formattype = FORMAT_VideoInfo;
>   this->m_sDestType.bFixedSizeSamples = true;
>   this->m_sDestType.bTemporalCompression = false;

This would need more testing.
A patch that can not break anything would be acceptable though.
E.g.
If DMO_FilterCreate fails, call it again with out_fmt set to NULL (not
GUID_NULL but NULL).
Then simplify the dmo.c part of the patch to
if (!out_fmt) break;



More information about the MPlayer-dev-eng mailing list