diff options
Diffstat (limited to 'libavcodec/vdpau.c')
-rw-r--r-- | libavcodec/vdpau.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c index 7578e62a86..6f9afa9fcc 100644 --- a/libavcodec/vdpau.c +++ b/libavcodec/vdpau.c @@ -288,7 +288,9 @@ int ff_vdpau_common_end_frame(AVCodecContext *avctx, AVFrame *frame, #if FF_API_BUFS_VDPAU FF_DISABLE_DEPRECATION_WARNINGS - hwctx->info = pic_ctx->info; + av_assert0(sizeof(hwctx->info) >= sizeof(pic_ctx->info)); + memset(&hwctx->info, 0, sizeof(hwctx->info)); + memcpy(&hwctx->info, &pic_ctx->info, sizeof(pic_ctx->info)); hwctx->bitstream_buffers = pic_ctx->bitstream_buffers; hwctx->bitstream_buffers_used = pic_ctx->bitstream_buffers_used; hwctx->bitstream_buffers_allocated = pic_ctx->bitstream_buffers_allocated; |