From ac1d5250c86dc8b4bef59cc5396411788c4b04b5 Mon Sep 17 00:00:00 2001 From: Johns Date: Mon, 13 Oct 2014 15:16:05 +0200 Subject: [PATCH] Fix crash with VA-API vdpau backend. --- ChangeLog | 5 +++++ video.c | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 466406d..100f9a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +User johns +Date: + + Fix crash with VA-API vdpau backend. + User mini73 Date: Sat Oct 11 16:53:18 CEST 2014 diff --git a/video.c b/video.c index 2fd63d7..219590d 100644 --- a/video.c +++ b/video.c @@ -2380,15 +2380,17 @@ static int VaapiInit(const char *display_name) int entrypoint_n; int i; - vaQueryConfigEntrypoints(VaDisplay, VAProfileNone, entrypoints, - &entrypoint_n); - VaapiVideoProcessing = 0; - for (i = 0; i < entrypoint_n; i++) { - if (entrypoints[i] == VAEntrypointVideoProc) { - Info("video/vaapi: supports video processing\n"); - VaapiVideoProcessing = 1; - break; + if (!vaQueryConfigEntrypoints(VaDisplay, VAProfileNone, entrypoints, + &entrypoint_n)) { + + for (i = 0; i < entrypoint_n; i++) { + fprintf(stderr, "oops %d\n", i); + if (entrypoints[i] == VAEntrypointVideoProc) { + Info("video/vaapi: supports video processing\n"); + VaapiVideoProcessing = 1; + break; + } } } }