va_x11.c::va_DisplayContextGetNumCandidates always returns success
- Dominant language
- C
- Stars
- 784
- Forks
- 314
- PR merge metrics
- No merged PRs in 30d
Description
Problem was detected while investigating the crash when running GStreamer pipeline with vaapisink over SSH with X Forwarding.
VA_API version 1.8.0
LibVA 2.8.0
in va_x11.c
```
234 static VAStatus va_DisplayContextGetNumCandidates (
235 VADisplayContextP pDisplayContext,
236 int *num_candidates
237 )
238 {
239 VAStatus vaStatus;
240
241 vaStatus = va_DRI2_GetNumCandidates(pDisplayContext, num_candidates);
242
243 /* A call to va_DisplayContextGetDriverName will fallback to other
244 * methods (i.e. NVCTRL, FGLRX) when DRI2 is unsuccessful. All of those
245 * fallbacks only have 1 candidate driver.
246 */
247 if (vaStatus != VA_STATUS_SUCCESS)
248 *num_candidates = 1;
249
250 return VA_STATUS_SUCCESS;
251 }
```
va_DisplayContextGetNumCandidates always returns SUCCESS status even if the DRI2 is not authed.
Seems like return status is not correct for this case.
Contributor guide
Assessment
This issue has not been assessed yet.