Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
4e684f13
Commit
4e684f13
authored
Jan 03, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
podcast: fail safe if running in LibVLC (i.e. without playlist)
parent
0476906e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
modules/services_discovery/podcast.c
modules/services_discovery/podcast.c
+11
-10
No files found.
modules/services_discovery/podcast.c
View file @
4e684f13
...
...
@@ -32,7 +32,6 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_services_discovery.h>
#include <vlc_playlist.h>
#include <vlc_network.h>
#include <assert.h>
...
...
@@ -120,10 +119,11 @@ static void SaveUrls( services_discovery_t *p_sd );
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
p_this
)
{
playlist_t
*
pl
=
pl_Get
(
p_this
);
if
(
strcmp
(
p_this
->
p_parent
->
psz_object_type
,
"playlist"
)
)
return
VLC_EGENERIC
;
/* FIXME: support LibVLC SD too! */
services_discovery_t
*
p_sd
=
(
services_discovery_t
*
)
p_this
;
services_discovery_sys_t
*
p_sys
=
malloc
(
sizeof
(
services_discovery_sys_t
)
);
services_discovery_sys_t
*
p_sys
=
malloc
(
sizeof
(
*
p_sys
)
);
if
(
!
p_sys
)
return
VLC_ENOMEM
;
...
...
@@ -143,6 +143,7 @@ static int Open( vlc_object_t *p_this )
p_sd
->
p_sys
=
p_sys
;
/* Launch the callback associated with this variable */
vlc_object_t
*
pl
=
p_sd
->
p_parent
;
var_Create
(
pl
,
"podcast-urls"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_AddCallback
(
pl
,
"podcast-urls"
,
UrlsChange
,
p_sys
);
...
...
@@ -167,8 +168,8 @@ static int Open( vlc_object_t *p_this )
static
void
Close
(
vlc_object_t
*
p_this
)
{
services_discovery_t
*
p_sd
=
(
services_discovery_t
*
)
p_this
;
services_discovery_sys_t
*
p_sys
=
p_sd
->
p_sys
;
playlist_t
*
pl
=
pl_Get
(
p_this
)
;
services_discovery_sys_t
*
p_sys
=
p_sd
->
p_sys
;
vlc_object_t
*
pl
=
p_sd
->
p_parent
;
int
i
;
vlc_cancel
(
p_sys
->
thread
);
...
...
@@ -220,8 +221,8 @@ static void *Run( void *data )
if
(
p_sys
->
update_type
==
UPDATE_URLS
)
{
playlist_t
*
pl
=
pl_Get
(
p_sd
);
char
*
psz_urls
=
var_GetNonEmptyString
(
pl
,
"podcast-urls"
);
char
*
psz_urls
=
var_GetNonEmptyString
(
p_sd
->
p_parent
,
"podcast-urls"
);
ParseUrls
(
p_sd
,
psz_urls
);
free
(
psz_urls
);
}
...
...
@@ -372,8 +373,8 @@ static void ParseRequest( services_discovery_t *p_sd )
if
(
!
p_sys
->
b_savedurls_loaded
)
{
playlist_t
*
pl
=
pl_Get
(
p_sd
);
char
*
psz_urls
=
var_GetNonEmptyString
(
pl
,
"podcast-urls"
);
char
*
psz_urls
=
var_GetNonEmptyString
(
p_sd
->
p_parent
,
"podcast-urls"
);
ParseUrls
(
p_sd
,
psz_urls
);
free
(
psz_urls
);
}
...
...
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