summaryrefslogtreecommitdiff
path: root/libavcodec/vdpau.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-28 01:47:05 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-28 01:47:05 +0100
commitc263102298ecb1cb8d307d881d2f45e0f6fc16d2 (patch)
tree29c6daf895ec8cd76360afcfd768bbe1c9a0345a /libavcodec/vdpau.c
parent17dde95ec52e45b063776f4303d93ea2329e29f0 (diff)
avcodec/vdpau: fix assertion failure and < vs > error
Fixes Ticket4211 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vdpau.c')
-rw-r--r--libavcodec/vdpau.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index 6f9afa9fcc..475a56c73c 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
@@ -288,9 +288,8 @@ int ff_vdpau_common_end_frame(AVCodecContext *avctx, AVFrame *frame,
#if FF_API_BUFS_VDPAU
FF_DISABLE_DEPRECATION_WARNINGS
- 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));
+ av_assert0(sizeof(hwctx->info) <= sizeof(pic_ctx->info));
+ memcpy(&hwctx->info, &pic_ctx->info, sizeof(hwctx->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;