From c5a07578a9bc0cd700e9c4b98c3efe9a0ee568ef Mon Sep 17 00:00:00 2001 From: ivo Date: Sun, 2 Jul 2006 20:22:59 +0000 Subject: [PATCH] use libavutil's md5 implementation instead of local imported copy git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18887 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_md5sum.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/libvo/vo_md5sum.c b/libvo/vo_md5sum.c index fec9209ee4..830feeb106 100644 --- a/libvo/vo_md5sum.c +++ b/libvo/vo_md5sum.c @@ -10,6 +10,7 @@ * * Changelog * + * 2006-07-02 Removed imported md5sum code and rely on libavutil now * 2005-01-16 Replaced suboption parser by call to subopt-helper. * 2004-09-16 Second draft. It now acts on VOCTRL_DRAW_IMAGE and does not * maintain a local copy of the image if the format is YV12. @@ -38,7 +39,7 @@ #include "video_out_internal.h" #include "mplayer.h" /* for exit_player() */ #include "help_mp.h" -#include "md5sum.h" +#include "libavutil/md5.h" /* ------------------------------------------------------------------------- */ @@ -201,22 +202,23 @@ static uint32_t draw_image(mp_image_t *mpi) uint32_t strideU = mpi->stride[1]; uint32_t strideV = mpi->stride[2]; - auth_md5Ctx md5_context; + uint8_t md5_context_memory[av_md5_size]; + struct AVMD5 *md5_context = (struct AVMD5*) md5_context_memory; unsigned int i; if (mpi->flags & MP_IMGFLAG_PLANAR) { /* Planar */ if (mpi->flags & MP_IMGFLAG_YUV) { /* Planar YUV */ - auth_md5InitCtx(&md5_context); + av_md5_init(md5_context); for (i=0; iw * (mpi->bpp >> 3) * mpi->h); + av_md5_sum(md5sum, rgbimage, mpi->w * (mpi->bpp >> 3) * mpi->h); md5sum_output_sum(md5sum); return VO_TRUE; }