Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
3a6da657
Commit
3a6da657
authored
May 26, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplification (and use only the needed memory).
parent
17c77005
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
modules/demux/playlist/playlist.c
modules/demux/playlist/playlist.c
+11
-8
No files found.
modules/demux/playlist/playlist.c
View file @
3a6da657
...
...
@@ -172,19 +172,22 @@ vlc_module_end ()
*/
char
*
FindPrefix
(
demux_t
*
p_demux
)
{
char
*
psz_name
;
char
*
psz_path
=
strdup
(
p_demux
->
psz_path
);
char
*
psz_file
;
char
*
psz_prefix
;
const
char
*
psz_path
=
p_demux
->
psz_path
;
#ifndef WIN32
psz_
nam
e
=
strrchr
(
psz_path
,
'/'
);
psz_
fil
e
=
strrchr
(
psz_path
,
'/'
);
#else
psz_
nam
e
=
strrchr
(
psz_path
,
'\\'
);
if
(
!
psz_
nam
e
)
psz_name
=
strrchr
(
psz_path
,
'/'
);
psz_
fil
e
=
strrchr
(
psz_path
,
'\\'
);
if
(
!
psz_
fil
e
)
psz_name
=
strrchr
(
psz_path
,
'/'
);
#endif
if
(
psz_name
)
psz_name
[
1
]
=
'\0'
;
else
*
psz_path
=
'\0'
;
if
(
psz_file
)
psz_prefix
=
strndup
(
psz_path
,
psz_file
-
psz_path
+
1
);
else
psz_prefix
=
strdup
(
""
);
return
psz_p
ath
;
return
psz_p
refix
;
}
/**
...
...
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