[vlc-devel] [PATCH v2 08/15] lua: sd: use new md5 API
Marvin Scholz
epirat07 at gmail.com
Wed Apr 8 00:04:24 CEST 2020
---
modules/lua/libs/sd.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/modules/lua/libs/sd.c b/modules/lua/libs/sd.c
index 7f6c085fb3..7514163853 100644
--- a/modules/lua/libs/sd.c
+++ b/modules/lua/libs/sd.c
@@ -37,7 +37,7 @@
#include <vlc_common.h>
#include <vlc_services_discovery.h>
#include <vlc_charset.h>
-#include <vlc_md5.h>
+#include <vlc_hash.h>
#include "../vlc.h"
#include "../libs.h"
@@ -215,12 +215,11 @@ static input_item_t *vlclua_sd_create_item( services_discovery_t *p_sd,
char *s = strdup( luaL_checkstring( L, -1 ) );
if ( s )
{
- struct md5_s md5;
- InitMD5( &md5 );
- AddMD5( &md5, s, strlen( s ) );
- EndMD5( &md5 );
+ vlc_hash_md5_t md5;
+ vlc_hash_md5_Init( &md5 );
+ vlc_hash_md5_Update( &md5, s, strlen( s ) );
free( s );
- s = psz_md5_hash( &md5 );
+ s = vlc_hash_md5_FinishHex( &md5 );
if ( s )
input_item_AddInfo( p_input, "uid", "md5", "%s", s );
free( s );
--
2.24.1 (Apple Git-126)
More information about the vlc-devel
mailing list