---
libavcodec/vdpau.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index 68d0813f6..aff989f58 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
@@ -24,6 +24,7 @@
#include <limits.h>
#include "avcodec.h"
+#include "hwaccel.h"
#include "internal.h"
#include "h264dec.h"
#include "vc1.h"
@@ -164,6 +165,12 @@ int ff_vdpau_common_init(AVCodecContext *avctx,
VdpDecoderProfile profile,
frames_ctx->width = avctx->coded_width;
frames_ctx->height = avctx->coded_height;
+ ret = ff_init_hw_frames(avctx);
+ if (ret < 0) {
+ av_buffer_unref(&avctx->hw_frames_ctx);
+ return ret;
+ }
+
ret = av_hwframe_ctx_init(avctx->hw_frames_ctx);
if (ret < 0) {
av_buffer_unref(&avctx->hw_frames_ctx);
--
2.11.0
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel