使用MediaFoundation渲染h264视频时SharpDX崩溃

时间:2013-11-06 10:13:30

标签: c# directx-11 directx-9 sharpdx

我正在使用SharpDX应用程序循环播放h264视频,偶尔我遇到了崩溃,我无法找到原因。

SharpDX.SharpDXException: HRESULT: [0xC00D36BA], Module: [Unknown], ApiCode: [Unknown/Unknown], Message: Unknown
at SharpDX.Result.CheckError()
at SharpDX.MediaFoundation.MediaFactory.GetService(ComObject unkObjectRef, Guid guidService, Guid riid, IntPtr& vObjectOut)

在此函数中调用它:

    public static Surface GetSurfaceFromMediaBuffer(MediaBuffer videoBuffer)
    {
        IntPtr surfacePtr;

        MediaFactory.GetService(videoBuffer, mMrBufferService, typeof (Surface).GUID, out surfacePtr);

        return new Surface(surfacePtr);
    }

是否有与Surface或MediaBuffer相关的东西需要处置?

这是在win7,32位。

0 个答案:

没有答案