Signed-off-by: Rostislav Pehlivanov <[email protected]>
---
libavutil/hwcontext_opencl.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c
index 43b5c5ae0c..1d18da37bf 100644
--- a/libavutil/hwcontext_opencl.c
+++ b/libavutil/hwcontext_opencl.c
@@ -2171,10 +2171,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);
--
2.17.0
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel