Permalink
Browse files

xvba: do not load on non-ati platforms

  • Loading branch information...
1 parent 2604dc0 commit ac35b05227def803ec6ed2424f2c0571c55ba602 @FernetMenta committed Jan 8, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 xbmc/cores/dvdplayer/DVDCodecs/Video/XVBA.cpp
@@ -22,6 +22,7 @@
#include "system.h"
#ifdef HAVE_LIBXVBA
#include <dlfcn.h>
+#include <string>
#include "XVBA.h"
#include "windowing/WindowingFactory.h"
#include "guilib/GraphicContext.h"
@@ -304,6 +305,13 @@ void CDecoder::OnResetDevice()
bool CDecoder::Open(AVCodecContext* avctx, const enum PixelFormat fmt, unsigned int surfaces)
{
+ std::string Vendor = g_Windowing.GetRenderVendor();
+ std::transform(Vendor.begin(), Vendor.end(), Vendor.begin(), ::tolower);
+ if (Vendor.compare(0, 3, "ati") != 0)
+ {
+ return false;
+ }
+
CLog::Log(LOGNOTICE,"(XVBA::Open) opening dxva decoder");
if(avctx->coded_width == 0

0 comments on commit ac35b05

Please sign in to comment.