Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
451
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
5d259c01
Commit
5d259c01
authored
8 years ago
by
Rémi Denis-Courmont
Browse files
Options
Downloads
Patches
Plain Diff
pls: handle FindPrefix() failure and simplify
parent
e73a376d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
modules/demux/playlist/playlist.c
+1
-1
1 addition, 1 deletion
modules/demux/playlist/playlist.c
modules/demux/playlist/playlist.h
+0
-1
0 additions, 1 deletion
modules/demux/playlist/playlist.h
modules/demux/playlist/pls.c
+9
-18
9 additions, 18 deletions
modules/demux/playlist/pls.c
with
10 additions
and
20 deletions
modules/demux/playlist/playlist.c
+
1
−
1
View file @
5d259c01
...
...
@@ -109,7 +109,7 @@ vlc_module_begin ()
set_description
(
N_
(
"PLS playlist import"
)
)
add_shortcut
(
"playlist"
,
"pls-open"
)
set_capability
(
"demux"
,
10
)
set_callbacks
(
Import_PLS
,
Close_PLS
)
set_callbacks
(
Import_PLS
,
NULL
)
add_submodule
()
set_description
(
N_
(
"B4S playlist import"
)
)
add_shortcut
(
"playlist"
,
"b4s-open"
,
"shout-b4s"
)
...
...
This diff is collapsed.
Click to expand it.
modules/demux/playlist/playlist.h
+
0
−
1
View file @
5d259c01
...
...
@@ -39,7 +39,6 @@ int Import_RAM ( vlc_object_t * );
void
Close_RAM
(
vlc_object_t
*
);
int
Import_PLS
(
vlc_object_t
*
);
void
Close_PLS
(
vlc_object_t
*
);
int
Import_B4S
(
vlc_object_t
*
);
...
...
This diff is collapsed.
Click to expand it.
modules/demux/playlist/pls.c
+
9
−
18
View file @
5d259c01
...
...
@@ -34,11 +34,6 @@
#include
"playlist.h"
struct
demux_sys_t
{
char
*
psz_prefix
;
};
/*****************************************************************************
* Local prototypes
*****************************************************************************/
...
...
@@ -61,24 +56,19 @@ int Import_PLS( vlc_object_t *p_this )
}
else
return
VLC_EGENERIC
;
STANDARD_DEMUX_INIT_MSG
(
"found valid PLS playlist file"
);
p_demux
->
p_sys
->
psz_prefix
=
FindPrefix
(
p_demux
);
msg_Dbg
(
p_demux
,
"found valid PLS playlist file"
);
p_demux
->
pf_demux
=
Demux
;
p_demux
->
pf_control
=
Control
;
return
VLC_SUCCESS
;
}
/*****************************************************************************
* Deactivate: frees unused data
*****************************************************************************/
void
Close_PLS
(
vlc_object_t
*
p_this
)
{
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
free
(
p_demux
->
p_sys
->
psz_prefix
);
free
(
p_demux
->
p_sys
);
}
static
int
Demux
(
demux_t
*
p_demux
)
{
char
*
psz_prefix
=
FindPrefix
(
p_demux
);
if
(
unlikely
(
psz_prefix
==
NULL
)
)
return
VLC_DEMUXER_EOF
;
char
*
psz_name
=
NULL
;
char
*
psz_line
;
char
*
psz_mrl
=
NULL
;
...
...
@@ -162,7 +152,7 @@ static int Demux( demux_t *p_demux )
{
free
(
psz_mrl_orig
);
psz_mrl_orig
=
psz_mrl
=
ProcessMRL
(
psz_value
,
p_demux
->
p_sys
->
psz_prefix
);
psz_mrl
=
ProcessMRL
(
psz_value
,
psz_prefix
);
if
(
!
strncasecmp
(
psz_key
,
"Ref"
,
sizeof
(
"Ref"
)
-
1
)
)
{
...
...
@@ -202,5 +192,6 @@ static int Demux( demux_t *p_demux )
input_item_node_PostAndDelete
(
p_subitems
);
vlc_gc_decref
(
p_current_input
);
free
(
psz_prefix
);
return
0
;
/* Needed for correct operation of go back */
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment