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
641b7faa
Commit
641b7faa
authored
Dec 04, 2006
by
Marian Durkovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport [18230] closes #862 for 0.8.6-branch
parent
e4c89d48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
6 deletions
+24
-6
modules/demux/playlist/m3u.c
modules/demux/playlist/m3u.c
+24
-6
No files found.
modules/demux/playlist/m3u.c
View file @
641b7faa
...
...
@@ -105,6 +105,27 @@ void E_(Close_M3U)( vlc_object_t *p_this )
free
(
p_demux
->
p_sys
);
}
/* Kvik! */
static
inline
char
*
MaybeFromLocaleDup
(
const
char
*
str
)
{
if
(
str
==
NULL
)
return
NULL
;
return
IsUTF8
(
str
)
?
strdup
(
str
)
:
FromLocaleDup
(
str
);
}
static
inline
void
MaybeFromLocaleRep
(
char
**
str
)
{
char
*
const
orig_str
=
*
str
;
if
((
orig_str
!=
NULL
)
&&
!
IsUTF8
(
orig_str
))
{
*
str
=
FromLocaleDup
(
orig_str
);
free
(
orig_str
);
}
}
static
int
Demux
(
demux_t
*
p_demux
)
{
playlist_t
*
p_playlist
;
...
...
@@ -176,7 +197,7 @@ static int Demux( demux_t *p_demux )
psz_parse
+=
sizeof
(
"EXTVLCOPT:"
)
-
1
;
if
(
!*
psz_parse
)
goto
error
;
psz_option
=
strd
up
(
psz_parse
);
psz_option
=
MaybeFromLocaleD
up
(
psz_parse
);
if
(
psz_option
)
INSERT_ELEM
(
ppsz_options
,
i_options
,
i_options
,
psz_option
);
...
...
@@ -188,21 +209,18 @@ static int Demux( demux_t *p_demux )
if
(
!
psz_name
||
!*
psz_name
)
{
/* Use filename as name for relative entries */
psz_name
=
strd
up
(
psz_parse
);
psz_name
=
MaybeFromLocaleD
up
(
psz_parse
);
}
psz_mrl
=
E_
(
ProcessMRL
)(
psz_parse
,
p_demux
->
p_sys
->
psz_prefix
);
MaybeFromLocaleRep
(
&
psz_mrl
);
b_cleanup
=
VLC_TRUE
;
if
(
!
psz_mrl
)
goto
error
;
EnsureUTF8
(
psz_name
);
EnsureUTF8
(
psz_mrl
);
p_item
=
playlist_ItemNew
(
p_playlist
,
psz_mrl
,
psz_name
);
for
(
i
=
0
;
i
<
i_options
;
i
++
)
{
EnsureUTF8
(
ppsz_options
[
i
]
);
playlist_ItemAddOption
(
p_item
,
ppsz_options
[
i
]
);
}
p_item
->
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