summaryrefslogtreecommitdiff
path: root/libs/ffvpx/libavutil/hwcontext.c
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2022-05-30 14:44:19 -0500
committerMatt A. Tobin <email@mattatobin.com>2022-05-30 14:49:22 -0500
commit8510f335c3ff39c207d8cb906da3eb91cd73d75a (patch)
tree88bc89f66bc6b15e27dab678d34c43aaad75de80 /libs/ffvpx/libavutil/hwcontext.c
parentf11b40c3ab4a5a766b0b71ab1e9a6199b23bbfeb (diff)
downloadaura-central-8510f335c3ff39c207d8cb906da3eb91cd73d75a.tar.gz
[Libs:ffvpx] Update FFVPX to version 4.2.7
Diffstat (limited to 'libs/ffvpx/libavutil/hwcontext.c')
-rw-r--r--libs/ffvpx/libavutil/hwcontext.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/libs/ffvpx/libavutil/hwcontext.c b/libs/ffvpx/libavutil/hwcontext.c
index 70c556eca..f1e404ab2 100644
--- a/libs/ffvpx/libavutil/hwcontext.c
+++ b/libs/ffvpx/libavutil/hwcontext.c
@@ -646,6 +646,9 @@ int av_hwdevice_ctx_create_derived(AVBufferRef **dst_ref_ptr,
ret = AVERROR(ENOMEM);
goto fail;
}
+ ret = av_hwdevice_ctx_init(dst_ref);
+ if (ret < 0)
+ goto fail;
goto done;
}
if (ret != AVERROR(ENOSYS))
@@ -658,10 +661,6 @@ int av_hwdevice_ctx_create_derived(AVBufferRef **dst_ref_ptr,
goto fail;
done:
- ret = av_hwdevice_ctx_init(dst_ref);
- if (ret < 0)
- goto fail;
-
*dst_ref_ptr = dst_ref;
return 0;
@@ -871,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);
+}