hwcontext_internal: add ff_hwframe_map_replace
Used to fix unmapping when no direct interop exists between APIs. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
This commit is contained in:
parent
deb9a04d54
commit
7062e4dbc8
2 changed files with 12 additions and 0 deletions
|
|
@ -870,3 +870,10 @@ fail:
|
|||
av_buffer_unref(&dst_ref);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ff_hwframe_map_replace(AVFrame *dst, const AVFrame *src)
|
||||
{
|
||||
HWMapDescriptor *hwmap = (HWMapDescriptor*)dst->buf[0]->data;
|
||||
av_frame_unref(hwmap->source);
|
||||
return av_frame_ref(hwmap->source, src);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue