Skip to content
Snippets Groups Projects
Commit df3b17eb authored by Mark Thompson's avatar Mark Thompson
Browse files

ffmpeg_vaapi: Unreference global device before setting it

This currently leaks if multiple device options are specified on the
command line.
parent fd57f70c
No related branches found
No related tags found
No related merge requests found
......@@ -220,6 +220,8 @@ av_cold int vaapi_device_init(const char *device)
{
int err;
av_buffer_unref(&hw_device_ctx);
err = av_hwdevice_ctx_create(&hw_device_ctx, AV_HWDEVICE_TYPE_VAAPI,
device, NULL, 0);
if (err < 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment