Skip to content

Commit

Permalink
winrenderer: fix fallback to pixel shader
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta committed Oct 14, 2014
1 parent 7153a46 commit d7196dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions xbmc/cores/VideoRenderers/WinRenderer.cpp
Expand Up @@ -174,6 +174,8 @@ void CWinRenderer::SelectRenderMethod()
if (shader.Create())
{
m_renderMethod = RENDER_PS;
if (m_format == RENDER_FMT_DXVA)
m_format = RENDER_FMT_NV12;
break;
}
else
Expand Down
5 changes: 4 additions & 1 deletion xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp
Expand Up @@ -25,6 +25,9 @@
#include "utils/fastmemcpy.h"
#include "cores/FFmpeg.h"
#include "Util.h"
#ifdef HAS_DX
#include "cores/dvdplayer/DVDCodecs/Video/DXVA.h"
#endif

#ifdef TARGET_WINDOWS
#pragma comment(lib, "avcodec.lib")
Expand Down Expand Up @@ -362,7 +365,7 @@ bool CDVDCodecUtils::CopyDXVA2Picture(YV12Image* pImage, DVDVideoPicture *pSrc)
{
case MAKEFOURCC('N','V','1','2'):
{
IDirect3DSurface9* surface = (IDirect3DSurface9*)pSrc->data[3];
IDirect3DSurface9* surface = (IDirect3DSurface9*)(pSrc->dxva->surface);

D3DLOCKED_RECT rectangle;
if (FAILED(surface->LockRect(&rectangle, NULL, 0)))
Expand Down

0 comments on commit d7196dd

Please sign in to comment.