Commit c4960477 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Some more const and strdup avoidance

parent 1f5a8130
...@@ -193,18 +193,19 @@ static int ASeek( stream_t *s, int64_t i_pos ); ...@@ -193,18 +193,19 @@ static int ASeek( stream_t *s, int64_t i_pos );
****************************************************************************/ ****************************************************************************/
stream_t *__stream_UrlNew( vlc_object_t *p_parent, const char *psz_url ) stream_t *__stream_UrlNew( vlc_object_t *p_parent, const char *psz_url )
{ {
char *psz_access, *psz_demux, *psz_path, *psz_dup; const char *psz_access, *psz_demux;
char *psz_path;
access_t *p_access; access_t *p_access;
stream_t *p_res; stream_t *p_res;
if( !psz_url ) return 0; if( !psz_url ) return 0;
psz_dup = strdup( psz_url ); char psz_dup[strlen (psz_url) + 1];
strcpy (psz_dup, psz_url);;
MRLSplit( p_parent, psz_dup, &psz_access, &psz_demux, &psz_path ); MRLSplit( p_parent, psz_dup, &psz_access, &psz_demux, &psz_path );
/* Now try a real access */ /* Now try a real access */
p_access = access2_New( p_parent, psz_access, psz_demux, psz_path, 0 ); p_access = access2_New( p_parent, psz_access, psz_demux, psz_path, 0 );
free( psz_dup );
if( p_access == NULL ) if( p_access == NULL )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment