Fix crash with VA-API vdpau backend.

This commit is contained in:
Johns 2014-10-13 15:16:05 +02:00
parent c2556eb90a
commit ac1d5250c8
2 changed files with 15 additions and 8 deletions

View File

@ -1,3 +1,8 @@
User johns
Date:
Fix crash with VA-API vdpau backend.
User mini73 User mini73
Date: Sat Oct 11 16:53:18 CEST 2014 Date: Sat Oct 11 16:53:18 CEST 2014

View File

@ -2380,11 +2380,12 @@ static int VaapiInit(const char *display_name)
int entrypoint_n; int entrypoint_n;
int i; int i;
vaQueryConfigEntrypoints(VaDisplay, VAProfileNone, entrypoints,
&entrypoint_n);
VaapiVideoProcessing = 0; VaapiVideoProcessing = 0;
if (!vaQueryConfigEntrypoints(VaDisplay, VAProfileNone, entrypoints,
&entrypoint_n)) {
for (i = 0; i < entrypoint_n; i++) { for (i = 0; i < entrypoint_n; i++) {
fprintf(stderr, "oops %d\n", i);
if (entrypoints[i] == VAEntrypointVideoProc) { if (entrypoints[i] == VAEntrypointVideoProc) {
Info("video/vaapi: supports video processing\n"); Info("video/vaapi: supports video processing\n");
VaapiVideoProcessing = 1; VaapiVideoProcessing = 1;
@ -2392,6 +2393,7 @@ static int VaapiInit(const char *display_name)
} }
} }
} }
}
#endif #endif
return 1; return 1;
} }