diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-28 01:47:05 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-28 01:47:05 +0100 |
commit | c263102298ecb1cb8d307d881d2f45e0f6fc16d2 (patch) | |
tree | 29c6daf895ec8cd76360afcfd768bbe1c9a0345a | |
parent | 17dde95ec52e45b063776f4303d93ea2329e29f0 (diff) | |
download | ffmpeg-c263102298ecb1cb8d307d881d2f45e0f6fc16d2.tar.gz |
avcodec/vdpau: fix assertion failure and < vs > error
Fixes Ticket4211
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/vdpau.c | 5 |
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; |