Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
// test whether this file belongs to our family
const uint8_t *p_peek;
bool file_ok = false;
-#warning Memory leak!
- std::string s_url = vlc_path2uri( s_filename.c_str(), "file" );
+ char *psz_url = vlc_path2uri( s_filename.c_str(), "file" );
stream_t *p_file_stream = stream_UrlNew(
p_demux,
- s_url.c_str() );
+ psz_url );
/* peek the begining */
if( p_file_stream &&
stream_Peek( p_file_stream, &p_peek, 4 ) >= 4
}
msg_Dbg( p_demux, "the file '%s' cannot be opened", s_filename.c_str() );
}
+ free( psz_url );
}
}
}