Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
06633533
Commit
06633533
authored
May 22, 2009
by
JP Dinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Recover from documented undefined value return on gnu platforms.
parent
7eb67a0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
src/input/item.c
src/input/item.c
+10
-7
No files found.
src/input/item.c
View file @
06633533
...
...
@@ -16,9 +16,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
*
along with this program; if not, write to the Free Software
*
Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
* You should have received a copy of the GNU General Public License
along
*
with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
...
...
@@ -371,29 +371,32 @@ void input_item_SetURI( input_item_t *p_i, const char *psz_uri )
/* The name is NULL: fill it with everything except login and password */
if
(
!
p_i
->
psz_name
)
{
int
r
;
vlc_url_t
url
;
vlc_UrlParse
(
&
url
,
psz_uri
,
0
);
if
(
url
.
psz_protocol
)
{
if
(
url
.
i_port
>
0
)
asprintf
(
&
p_i
->
psz_name
,
"%s://%s:%d%s"
,
url
.
psz_protocol
,
r
=
asprintf
(
&
p_i
->
psz_name
,
"%s://%s:%d%s"
,
url
.
psz_protocol
,
url
.
psz_host
,
url
.
i_port
,
url
.
psz_path
?
url
.
psz_path
:
""
);
else
asprintf
(
&
p_i
->
psz_name
,
"%s://%s%s"
,
url
.
psz_protocol
,
r
=
asprintf
(
&
p_i
->
psz_name
,
"%s://%s%s"
,
url
.
psz_protocol
,
url
.
psz_host
?
url
.
psz_host
:
""
,
url
.
psz_path
?
url
.
psz_path
:
""
);
}
else
{
if
(
url
.
i_port
>
0
)
asprintf
(
&
p_i
->
psz_name
,
"%s:%d%s"
,
url
.
psz_host
,
url
.
i_port
,
r
=
asprintf
(
&
p_i
->
psz_name
,
"%s:%d%s"
,
url
.
psz_host
,
url
.
i_port
,
url
.
psz_path
?
url
.
psz_path
:
""
);
else
asprintf
(
&
p_i
->
psz_name
,
"%s%s"
,
url
.
psz_host
,
r
=
asprintf
(
&
p_i
->
psz_name
,
"%s%s"
,
url
.
psz_host
,
url
.
psz_path
?
url
.
psz_path
:
""
);
}
vlc_UrlClean
(
&
url
);
if
(
-
1
==
r
)
p_i
->
psz_name
=
NULL
;
/* recover from undefined value */
}
vlc_mutex_unlock
(
&
p_i
->
lock
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment