modules/media/src/main/java/com/sun/media/jfxmedia/locator/HLSConnectionHolder.java

Print this page

       

*** 1,7 **** /* ! * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 591,601 **** } } private URI getPlaylistURI() throws URISyntaxException, MalformedURLException { String location = playlistsLocations.get(infoIndex); ! if (location.startsWith("http://")) { return new URI(location); } else { return new URI(playlistURI.toURL().toString().substring(0, playlistURI.toURL().toString().lastIndexOf("/") + 1) + location); } } --- 591,601 ---- } } private URI getPlaylistURI() throws URISyntaxException, MalformedURLException { String location = playlistsLocations.get(infoIndex); ! if (location.startsWith("http://") || location.startsWith("https://")) { return new URI(location); } else { return new URI(playlistURI.toURL().toString().substring(0, playlistURI.toURL().toString().lastIndexOf("/") + 1) + location); } }
*** 897,907 **** liveSemaphore.release(); } } private void setBaseURI(String playlistURI, String URI) { ! if (!URI.startsWith("http://")) { baseURI = playlistURI.substring(0, playlistURI.lastIndexOf("/") + 1); } needBaseURI = false; } } --- 897,907 ---- liveSemaphore.release(); } } private void setBaseURI(String playlistURI, String URI) { ! if (!URI.startsWith("http://") || !URI.startsWith("https://")) { baseURI = playlistURI.substring(0, playlistURI.lastIndexOf("/") + 1); } needBaseURI = false; } }