elFarto / nvidia-vaapi-driver

A VA-API implemention using NVIDIA's NVDEC
Other
1.15k stars 53 forks source link

vabackend: Treat surfaceCount == 1 the same as surfaceCount == 0 #295

Closed philipl closed 2 months ago

philipl commented 2 months ago

When Chrome(ium) wants dynamic surface allocation it starts with an initial count of 0, and that is handled today. On the other hand, recent versions of ffmpeg have switched to preferring dynamic allocation but they start with a surfaceCount of 1. If we treat this as a legitimate static request, we cannot do any decoding in practice, as you always need more than 1 surface.

So, treat a surfaceCount of 1 the same as 0, and use our same dynamic allocation work-around.

Fixes #292

elFarto commented 2 months ago

Thanks for this.