Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
c8869bbd
Commit
c8869bbd
authored
Feb 02, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Media discovery: remove exception
parent
b030f616
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
12 deletions
+8
-12
include/vlc/libvlc_media_discoverer.h
include/vlc/libvlc_media_discoverer.h
+2
-4
src/control/media_discoverer.c
src/control/media_discoverer.c
+6
-8
No files found.
include/vlc/libvlc_media_discoverer.h
View file @
c8869bbd
...
...
@@ -51,13 +51,11 @@ typedef struct libvlc_media_discoverer_t libvlc_media_discoverer_t;
*
* \param p_inst libvlc instance
* \param psz_name service name
* \param p_e an initialized exception object
* \return media discover object
* \return media discover object or NULL in case of error
*/
VLC_PUBLIC_API
libvlc_media_discoverer_t
*
libvlc_media_discoverer_new_from_name
(
libvlc_instance_t
*
p_inst
,
const
char
*
psz_name
,
libvlc_exception_t
*
p_e
);
const
char
*
psz_name
);
/**
* Release media discover object. If the reference count reaches 0, then
...
...
src/control/media_discoverer.c
View file @
c8869bbd
...
...
@@ -170,15 +170,13 @@ static void services_discovery_ended( const vlc_event_t * p_event,
**************************************************************************/
libvlc_media_discoverer_t
*
libvlc_media_discoverer_new_from_name
(
libvlc_instance_t
*
p_inst
,
const
char
*
psz_name
,
libvlc_exception_t
*
p_e
)
const
char
*
psz_name
)
{
libvlc_media_discoverer_t
*
p_mdis
;
p_mdis
=
malloc
(
sizeof
(
libvlc_media_discoverer_t
));
if
(
!
p_mdis
)
if
(
unlikely
(
!
p_mdis
)
)
{
libvlc_exception_raise
(
p_e
);
libvlc_printerr
(
"Not enough memory"
);
return
NULL
;
}
...
...
@@ -206,9 +204,9 @@ libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
if
(
!
p_mdis
->
p_sd
)
{
libvlc_media_list_release
(
p_mdis
->
p_mlist
);
libvlc_exception_raise
(
p_e
);
libvlc_printerr
(
"%s: no such discovery module found"
,
psz_name
);
libvlc_media_list_release
(
p_mdis
->
p_mlist
);
libvlc_event_manager_release
(
p_mdis
->
p_event_manager
);
free
(
p_mdis
);
return
NULL
;
}
...
...
@@ -233,9 +231,9 @@ libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
/* Here we go */
if
(
!
vlc_sd_Start
(
p_mdis
->
p_sd
,
psz_name
)
)
{
libvlc_media_list_release
(
p_mdis
->
p_mlist
);
libvlc_exception_raise
(
p_e
);
libvlc_printerr
(
"%s: internal module error"
,
psz_name
);
libvlc_media_list_release
(
p_mdis
->
p_mlist
);
libvlc_event_manager_release
(
p_mdis
->
p_event_manager
);
free
(
p_mdis
);
return
NULL
;
}
...
...
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