[vlc-devel] [PATCH v2 11/15] input: use new md5 API
Marvin Scholz
epirat07 at gmail.com
Wed Apr 8 00:04:27 CEST 2020
---
src/input/input.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/input/input.c b/src/input/input.c
index 34f965ed19..31a4a4214d 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,11 +2539,10 @@ 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;
+ vlc_hash_md5_Init( &md5 );
+ vlc_hash_md5_Update( &md5, psz_mrl, strlen( psz_mrl ) );
+ in->str_id = vlc_hash_md5_FinishHex( &md5 );
if( !in->str_id )
{
free( in );
--
2.24.1 (Apple Git-126)
More information about the vlc-devel
mailing list