Merge commit '737d35e33408263c04d7730f5487eed0d04938ba'
[ffmpeg.git] / libavcodec / vdpau.c
index 7578e62a8639be48df786fcd8af0b1a46c69c27a..6f9afa9fcc15b048f17bfcc8351e253149b2774b 100644 (file)
@@ -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;