Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
3c4599a8
Commit
3c4599a8
authored
Jan 06, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set default item name on input_item_SetURI.
It fixes item name with xpsf playlist (at least).
parent
ab85aafb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
19 deletions
+20
-19
src/input/item.c
src/input/item.c
+20
-19
No files found.
src/input/item.c
View file @
3c4599a8
...
@@ -337,8 +337,21 @@ void input_item_SetURI( input_item_t *p_i, const char *psz_uri )
...
@@ -337,8 +337,21 @@ void input_item_SetURI( input_item_t *p_i, const char *psz_uri )
free
(
p_i
->
psz_uri
);
free
(
p_i
->
psz_uri
);
p_i
->
psz_uri
=
strdup
(
psz_uri
);
p_i
->
psz_uri
=
strdup
(
psz_uri
);
GuessType
(
p_i
);
GuessType
(
p_i
);
if
(
!
p_i
->
psz_name
&&
p_i
->
i_type
==
ITEM_TYPE_FILE
)
{
const
char
*
psz_filename
=
strrchr
(
p_i
->
psz_uri
,
DIR_SEP_CHAR
);
if
(
psz_filename
&&
*
psz_filename
==
DIR_SEP_CHAR
)
psz_filename
++
;
if
(
psz_filename
&&
*
psz_filename
)
p_i
->
psz_name
=
strdup
(
psz_filename
);
}
if
(
!
p_i
->
psz_name
)
p_i
->
psz_name
=
strdup
(
p_i
->
psz_uri
);
vlc_mutex_unlock
(
&
p_i
->
lock
);
vlc_mutex_unlock
(
&
p_i
->
lock
);
}
}
...
@@ -649,29 +662,17 @@ input_item_t *input_item_NewWithType( vlc_object_t *p_obj, const char *psz_uri,
...
@@ -649,29 +662,17 @@ input_item_t *input_item_NewWithType( vlc_object_t *p_obj, const char *psz_uri,
p_input
->
b_fixed_name
=
false
;
p_input
->
b_fixed_name
=
false
;
if
(
psz_uri
)
p_input
->
psz_uri
=
strdup
(
psz_uri
);
else
p_input
->
psz_uri
=
NULL
;
p_input
->
i_type
=
i_type
;
p_input
->
i_type
=
i_type
;
p_input
->
b_prefers_tree
=
false
;
p_input
->
b_prefers_tree
=
false
;
if
(
p
_input
->
i_type
==
ITEM_TYPE_UNKNOWN
)
if
(
p
sz_uri
)
GuessType
(
p_input
);
input_item_SetURI
(
p_input
,
psz_uri
);
if
(
psz_name
!=
NULL
)
if
(
i_type
!=
ITEM_TYPE_UNKNOWN
)
p_input
->
psz_name
=
strdup
(
psz_name
);
p_input
->
i_type
=
i_type
;
else
if
(
p_input
->
i_type
==
ITEM_TYPE_FILE
&&
p_input
->
psz_uri
)
{
if
(
psz_name
)
const
char
*
psz_filename
=
strrchr
(
p_input
->
psz_uri
,
DIR_SEP_CHAR
);
input_item_SetName
(
p_input
,
psz_name
);
if
(
psz_filename
&&
*
psz_filename
==
DIR_SEP_CHAR
)
psz_filename
++
;
p_input
->
psz_name
=
strdup
(
psz_filename
&&
*
psz_filename
?
psz_filename
:
p_input
->
psz_uri
);
}
else
p_input
->
psz_name
=
p_input
->
psz_uri
?
strdup
(
p_input
->
psz_uri
)
:
NULL
;
p_input
->
i_duration
=
i_duration
;
p_input
->
i_duration
=
i_duration
;
...
...
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