---
 libavcodec/vdpau.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index 68d0813f6..da131a9fe 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
@@ -164,6 +164,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
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to