diff options
author | Rostislav Pehlivanov <atomnuker@gmail.com> | 2018-04-20 05:30:04 +0100 |
---|---|---|
committer | Rostislav Pehlivanov <atomnuker@gmail.com> | 2018-06-21 16:34:10 +0100 |
commit | a2613647c4f40b9e802cd21f37545ef1fdf370d1 (patch) | |
tree | 89facbf16760a37a694746980ffcd9380134eff0 /libavutil | |
parent | 7062e4dbc8240389bf64f46f527eabfc5adcd58b (diff) | |
download | ffmpeg-streaming-a2613647c4f40b9e802cd21f37545ef1fdf370d1.zip ffmpeg-streaming-a2613647c4f40b9e802cd21f37545ef1fdf370d1.tar.gz |
hwcontext_opencl: use ff_hwframe_map_replace()
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/hwcontext_opencl.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c index 07458c2..d288ddb 100644 --- a/libavutil/hwcontext_opencl.c +++ b/libavutil/hwcontext_opencl.c @@ -2172,10 +2172,7 @@ static int opencl_map_from_vaapi(AVHWFramesContext *dst_fc, if (err < 0) goto fail; - // Adjust the map descriptor so that unmap works correctly. - hwmap = (HWMapDescriptor*)dst->buf[0]->data; - av_frame_unref(hwmap->source); - err = av_frame_ref(hwmap->source, src); + err = ff_hwframe_map_replace(dst, src); fail: av_frame_free(&tmp); |