Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

xvba: do not create decoder for surfaces larger than width 2048 or he…

…ight 1536
  • Loading branch information...
commit e663b18f31a322c5928e96f9a300c105b37f98a4 1 parent 4eb9ee7
@fritsch fritsch authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 xbmc/cores/dvdplayer/DVDCodecs/Video/XVBA.cpp
View
15 xbmc/cores/dvdplayer/DVDCodecs/Video/XVBA.cpp
@@ -333,6 +333,21 @@ bool CDecoder::Open(AVCodecContext* avctx, const enum PixelFormat fmt, unsigned
return false;
}
+ // Fixme: Revisit with new SDK
+ // Workaround for 0.74.01-AES-2 that does not signal if surfaces are too large
+ // it seems that xvba does not support anything > 2k
+ // return false, for files that are larger
+ // if you are unlucky, this would kill your decoder
+ // we limit to 2048x1536(+8) now - as this was tested working
+ int surfaceWidth = (avctx->coded_width+15) & ~15;
+ int surfaceHeight = (avctx->coded_height+15) & ~15;
+ if(surfaceHeight > 1544 || surfaceWidth > 2048)
+ {
+ CLog::Log(LOGERROR, "Surface too large, decoder skipped: surfaceWidth %u, surfaceHeight %u",
+ surfaceWidth, surfaceHeight);
+ return false;
+ }
+
if (!m_dllAvUtil.Load())
return false;
Please sign in to comment.
Something went wrong with that request. Please try again.