diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-01-22 18:48:51 +0000 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2017-02-05 15:13:15 +0000 |
commit | df3b17eba47e635a694acb18b74e389194355f45 (patch) | |
tree | 1b9a5490f140079cdef9fd6571a8de3d5cc80802 /ffmpeg_vaapi.c | |
parent | fd57f70c9788e55ec9270e1f43ac1a680b9b9531 (diff) | |
download | ffmpeg-df3b17eba47e635a694acb18b74e389194355f45.tar.gz |
ffmpeg_vaapi: Unreference global device before setting it
This currently leaks if multiple device options are specified on the
command line.
Diffstat (limited to 'ffmpeg_vaapi.c')
-rw-r--r-- | ffmpeg_vaapi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ffmpeg_vaapi.c b/ffmpeg_vaapi.c index b9ad7adee9..6530908ef4 100644 --- a/ffmpeg_vaapi.c +++ b/ffmpeg_vaapi.c @@ -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) { |