aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfritsch <Peter.Fruehberger@gmail.com>2014-12-09 13:23:39 +0100
committerfritsch <Peter.Fruehberger@gmail.com>2014-12-14 11:31:02 +0100
commit73c07a86ef7065dd79010a2df0aec5ebe6297edd (patch)
tree4770d41f52efc60cfe75a2900b693d12316dac87
parent0c7b6771e75dcab764657d56023ceda25509468e (diff)
VAAPI: Take more care when probing filters
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
index 8ef0a22528..369bbde5a5 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
@@ -2961,6 +2961,7 @@ bool CFFmpegPostproc::PreInit(CVaapiConfig &config, SDiMethods *methods)
return false;
VAImage image;
+ image.image_id = VA_INVALID_ID;
VASurfaceID surface = config.videoSurfaces->GetAtIndex(0);
VAStatus status = vaDeriveImage(config.dpy, surface, &image);
if (status != VA_STATUS_SUCCESS)
@@ -2968,17 +2969,18 @@ bool CFFmpegPostproc::PreInit(CVaapiConfig &config, SDiMethods *methods)
CLog::Log(LOGWARNING,"VAAPI::SupportsFilter vaDeriveImage not supported");
use_filter = false;
}
- if (image.format.fourcc != VA_FOURCC_NV12)
+ if (use_filter && (image.format.fourcc != VA_FOURCC_NV12))
{
CLog::Log(LOGWARNING,"VAAPI::SupportsFilter image format not NV12");
use_filter = false;
}
- if ((image.pitches[0] % 64) || (image.pitches[1] % 64))
+ if (use_filter && ((image.pitches[0] % 64) || (image.pitches[1] % 64)))
{
CLog::Log(LOGWARNING,"VAAPI::SupportsFilter patches no multiple of 64");
use_filter = false;
}
- CheckSuccess(vaDestroyImage(config.dpy,image.image_id));
+ if (image.image_id != VA_INVALID_ID)
+ CheckSuccess(vaDestroyImage(config.dpy,image.image_id));
if (use_filter)
{