[FFmpeg-devel] [PATCH] lavu/hwcontext_vaapi: Skip 'vgem' driver
Brian Norris
briannorris at chromium.org
Tue Dec 6 00:27:35 EET 2022
On Mon, Dec 05, 2022 at 04:37:29AM +0000, Xiang, Haihao wrote:
> On Wed, 2022-11-23 at 13:54 -0800, Brian Norris wrote:
> > + } else if (!strncmp(info->name, "vgem", 4)) {
>
> The virtual GEM device is vgem, so better to use strcmp here.
Good point, we probably shouldn't be matching "vgem-foo" driver here.
And drmGetVersion() ensures info->name is 0-terminated, so we're not
gaining any safety by providing bounds.
I think I was needlessly matching libva-utils too closely, where they do
the same strncmp().
v2 incoming.
Brian
More information about the ffmpeg-devel
mailing list