aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/hwcontext.c
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2017-10-08 15:19:17 +0100
committerMark Thompson <sw@jkqxz.net>2018-02-11 22:11:10 +0000
commitcaecb85014fc81f8734560a150073627eedab78c (patch)
tree61bfe54f2b7bbd11fecfcaaf0988fb14ec7f293c /libavutil/hwcontext.c
parentc6bc18bc121ea66df715123c59f7ef9542c0914a (diff)
downloadffmpeg-caecb85014fc81f8734560a150073627eedab78c.tar.gz
hwcontext: Perform usual initialisation on derived device contexts
The initialisation should be common. For libmfx, it was previously happening in the derivation function and this moves it out.
Diffstat (limited to 'libavutil/hwcontext.c')
-rw-r--r--libavutil/hwcontext.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c
index 2630087b5d..cccbd6234e 100644
--- a/libavutil/hwcontext.c
+++ b/libavutil/hwcontext.c
@@ -645,6 +645,10 @@ 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;