[vlc-devel] [PATCH v4 10/14] input: use new md5 API
Marvin Scholz
epirat07 at gmail.com
Wed Apr 15 13:35:25 CEST 2020
---
src/input/input.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/input/input.c b/src/input/input.c
index 34f965ed19..d6256fef47 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -54,7 +54,7 @@
#include <vlc_stream.h>
#include <vlc_stream_extractor.h>
#include <vlc_renderer_discovery.h>
-#include <vlc_md5.h>
+#include <vlc_hash.h>
/*****************************************************************************
* Local prototypes
@@ -2539,16 +2539,18 @@ static input_source_t *InputSourceNew( const char *psz_mrl )
if( psz_mrl )
{
/* Use the MD5 sum of the complete source URL as an identifier. */
- struct md5_s md5;
- InitMD5( &md5 );
- AddMD5( &md5, psz_mrl, strlen( psz_mrl ) );
- EndMD5( &md5 );
- in->str_id = psz_md5_hash( &md5 );
+ vlc_hash_md5_t md5;
+
+ in->str_id = malloc(VLC_HASH_MD5_DIGEST_HEX_SIZE);
if( !in->str_id )
{
free( in );
return NULL;
}
+
+ vlc_hash_md5_Init( &md5 );
+ vlc_hash_md5_Update( &md5, psz_mrl, strlen( psz_mrl ) );
+ vlc_hash_FinishHex( &md5, in->str_id );
}
return in;
--
2.24.1 (Apple Git-126)
More information about the vlc-devel
mailing list