[FFmpeg-devel] [PATCH v2 3/3] hwcontext_vaapi: #if guard VAAPI_DRM specifics

Emil Velikov emil.l.velikov at gmail.com
Fri Jul 29 18:35:10 EEST 2022


On Thu, 28 Jul 2022 at 15:04, Anton Khirnov <anton at khirnov.net> wrote:
>
> Quoting Emil Velikov (2022-07-22 15:27:26)
> >
> > Assuming I'm reading the code correctly, currently when both are
> > undefined vaapi_device_create() will be basically a dummy, doing some
> > basic malloc + opts parsing and erroring out.
> >
> > So as-is functions like av_hwdevice_ctx_alloc() will return success,
> > although as av_hwdevice_ctx_create() is called later on it will always
> > fail.
> > My aim was to effectively omit the HWContextType vaapi instance in the
> > final libavutil, since it cannot work. Perhaps there's a better way to
> > achieve that?
>
> You seem to have missed that av_hwdevice_ctx_create() is entirely
> optional. The users _can_ call it to avoid some boilerplate, but they
> can just as well use av_hwdevice_ctx_alloc()+av_hwdevice_ctx_init(),
> while opening the device themselves using whatever other means.
>

Indeed, I have. Thanks for the clarification.

-Emil


More information about the ffmpeg-devel mailing list