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
708b80c4
Commit
708b80c4
authored
Feb 15, 2006
by
Olivier Aubert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src/control/mediacontrol_init.c: check return values of VLC_Create and VLC_Init
parent
41998e06
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
src/control/mediacontrol_init.c
src/control/mediacontrol_init.c
+15
-3
No files found.
src/control/mediacontrol_init.c
View file @
708b80c4
...
...
@@ -40,13 +40,20 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex
ppsz_argv
[
i_count
+
1
]
=
NULL
;
p_vlc_id
=
VLC_Create
();
if
(
p_vlc_id
<
0
)
{
exception
->
code
=
mediacontrol_InternalException
;
exception
->
message
=
strdup
(
"Unable to create VLC"
);
return
NULL
;
}
p_vlc
=
(
vlc_object_t
*
)
vlc_current_object
(
p_vlc_id
);
if
(
!
p_vlc
)
{
exception
->
code
=
mediacontrol_InternalException
;
exception
->
message
=
strdup
(
"Unable to
initialize VLC
"
);
exception
->
message
=
strdup
(
"Unable to
find VLC object
"
);
return
NULL
;
}
retval
=
(
mediacontrol_Instance
*
)
malloc
(
sizeof
(
mediacontrol_Instance
)
);
...
...
@@ -57,7 +64,12 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex
return
NULL
;
}
VLC_Init
(
p_vlc_id
,
i_count
+
1
,
ppsz_argv
);
if
(
VLC_Init
(
p_vlc_id
,
i_count
+
1
,
ppsz_argv
)
!=
VLC_SUCCESS
)
{
exception
->
code
=
mediacontrol_InternalException
;
exception
->
message
=
strdup
(
"Cannot initialize VLC"
);
return
NULL
;
}
retval
->
p_vlc
=
p_vlc
;
retval
->
vlc_object_id
=
p_vlc_id
;
...
...
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