forked from FFmpeg/FFmpeg
hwcontext_opencl: use ff_hwframe_map_replace()
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
This commit is contained in:
parent
7062e4dbc8
commit
a2613647c4
1 changed files with 1 additions and 4 deletions
|
@ -2172,10 +2172,7 @@ static int opencl_map_from_vaapi(AVHWFramesContext *dst_fc,
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
// Adjust the map descriptor so that unmap works correctly.
|
err = ff_hwframe_map_replace(dst, src);
|
||||||
hwmap = (HWMapDescriptor*)dst->buf[0]->data;
|
|
||||||
av_frame_unref(hwmap->source);
|
|
||||||
err = av_frame_ref(hwmap->source, src);
|
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
av_frame_free(&tmp);
|
av_frame_free(&tmp);
|
||||||
|
|
Loading…
Add table
Reference in a new issue