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
fa428954
Commit
fa428954
authored
Jul 18, 2002
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ./src/vlc.c, ./src/libvlc.c: added more robust consistency checks.
parent
ed74b8c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
26 deletions
+19
-26
src/libvlc.c
src/libvlc.c
+16
-17
src/vlc.c
src/vlc.c
+3
-9
No files found.
src/libvlc.c
View file @
fa428954
...
...
@@ -4,7 +4,7 @@
* and spawns threads.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: libvlc.c,v 1.1
5 2002/07/16 21:29:10
sam Exp $
* $Id: libvlc.c,v 1.1
6 2002/07/18 01:00:41
sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -186,7 +186,7 @@ vlc_error_t vlc_init( vlc_t *p_vlc, int i_argc, char *ppsz_argv[] )
/* Check that the handle is valid */
if
(
!
p_vlc
||
p_vlc
->
i_status
!=
VLC_STATUS_CREATED
)
{
fprintf
(
stderr
,
"error: invalid status
\n
"
);
fprintf
(
stderr
,
"error: invalid status
(!CREATED)
\n
"
);
return
VLC_ESTATUS
;
}
...
...
@@ -480,12 +480,6 @@ vlc_error_t vlc_init( vlc_t *p_vlc, int i_argc, char *ppsz_argv[] )
config_PutInt
(
p_vlc
,
"network-channel"
,
VLC_FALSE
);
}
/* Update the handle status */
p_vlc
->
i_status
=
VLC_STATUS_STOPPED
;
/* XXX XXX XXX XXX XXX XXX XXX XXX */
/* XXX XXX XXX XXX XXX XXX XXX XXX */
/* XXX XXX XXX XXX XXX XXX XXX XXX */
/*
* Initialize playlist and get commandline files
*/
...
...
@@ -493,18 +487,22 @@ vlc_error_t vlc_init( vlc_t *p_vlc, int i_argc, char *ppsz_argv[] )
if
(
!
p_playlist
)
{
msg_Err
(
p_vlc
,
"playlist initialization failed"
);
if
(
p_vlc
->
p_memcpy_module
!=
NULL
)
{
module_Unneed
(
p_vlc
->
p_memcpy_module
);
}
module_EndBank
(
p_vlc
);
msg_Destroy
(
p_vlc
);
return
VLC_EGENERIC
;
}
/* Update the handle status */
p_vlc
->
i_status
=
VLC_STATUS_STOPPED
;
/*
* Get input filenames given as commandline arguments
*/
GetFilenames
(
p_vlc
,
i_argc
,
ppsz_argv
);
/* XXX XXX XXX XXX XXX XXX XXX XXX */
/* XXX XXX XXX XXX XXX XXX XXX XXX */
/* XXX XXX XXX XXX XXX XXX XXX XXX */
return
VLC_SUCCESS
;
}
...
...
@@ -522,7 +520,7 @@ vlc_error_t vlc_run( vlc_t *p_vlc )
/* Check that the handle is valid */
if
(
!
p_vlc
||
p_vlc
->
i_status
!=
VLC_STATUS_STOPPED
)
{
fprintf
(
stderr
,
"error: invalid status
\n
"
);
fprintf
(
stderr
,
"error: invalid status
(!STOPPED)
\n
"
);
return
VLC_ESTATUS
;
}
...
...
@@ -550,7 +548,7 @@ vlc_error_t vlc_add_intf( vlc_t *p_vlc, const char *psz_module,
/* Check that the handle is valid */
if
(
!
p_vlc
||
p_vlc
->
i_status
!=
VLC_STATUS_RUNNING
)
{
fprintf
(
stderr
,
"error: invalid status
\n
"
);
fprintf
(
stderr
,
"error: invalid status
(!RUNNING)
\n
"
);
return
VLC_ESTATUS
;
}
...
...
@@ -583,6 +581,7 @@ vlc_error_t vlc_add_intf( vlc_t *p_vlc, const char *psz_module,
err
=
intf_RunThread
(
p_intf
);
if
(
err
)
{
vlc_object_detach_all
(
p_intf
);
intf_Destroy
(
p_intf
);
return
err
;
}
...
...
@@ -606,7 +605,7 @@ vlc_error_t vlc_stop( vlc_t *p_vlc )
/* Check that the handle is valid */
if
(
!
p_vlc
||
p_vlc
->
i_status
!=
VLC_STATUS_RUNNING
)
{
fprintf
(
stderr
,
"error: invalid status
\n
"
);
fprintf
(
stderr
,
"error: invalid status
(!RUNNING)
\n
"
);
return
VLC_ESTATUS
;
}
...
...
@@ -673,7 +672,7 @@ vlc_error_t vlc_end( vlc_t *p_vlc )
/* Check that the handle is valid */
if
(
!
p_vlc
||
p_vlc
->
i_status
!=
VLC_STATUS_STOPPED
)
{
fprintf
(
stderr
,
"error: invalid status
\n
"
);
fprintf
(
stderr
,
"error: invalid status
(!STOPPED)
\n
"
);
return
VLC_ESTATUS
;
}
...
...
@@ -728,7 +727,7 @@ vlc_error_t vlc_destroy( vlc_t *p_vlc )
/* Check that the handle is valid */
if
(
!
p_vlc
||
p_vlc
->
i_status
!=
VLC_STATUS_CREATED
)
{
fprintf
(
stderr
,
"error: invalid status
\n
"
);
fprintf
(
stderr
,
"error: invalid status
(!CREATED)
\n
"
);
return
VLC_ESTATUS
;
}
...
...
@@ -802,7 +801,7 @@ vlc_error_t vlc_add_target( vlc_t *p_vlc, const char *psz_target,
if
(
!
p_vlc
||
(
p_vlc
->
i_status
!=
VLC_STATUS_STOPPED
&&
p_vlc
->
i_status
!=
VLC_STATUS_RUNNING
)
)
{
fprintf
(
stderr
,
"error: invalid status
\n
"
);
fprintf
(
stderr
,
"error: invalid status
(!STOPPED&&!RUNNING)
\n
"
);
return
VLC_ESTATUS
;
}
...
...
src/vlc.c
View file @
fa428954
...
...
@@ -2,7 +2,7 @@
* vlc.c: the vlc player
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: vlc.c,v 1.
4 2002/07/11 18:44:12
sam Exp $
* $Id: vlc.c,v 1.
5 2002/07/18 01:00:41
sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -75,14 +75,8 @@ int main(int i_argc, char *ppsz_argv[], char *ppsz_env[])
//vlc_add_intf( p_vlc, "kde", VLC_FALSE );
vlc_add_intf
(
p_vlc
,
"rc"
,
VLC_FALSE
);
/* Add a blocking interface */
/* Add a blocking interface
and keep the return value
*/
err
=
vlc_add_intf
(
p_vlc
,
NULL
,
VLC_TRUE
);
if
(
err
!=
VLC_SUCCESS
)
{
vlc_end
(
p_vlc
);
vlc_destroy
(
p_vlc
);
return
err
;
}
/* Finish the interface */
vlc_stop
(
p_vlc
);
...
...
@@ -93,6 +87,6 @@ int main(int i_argc, char *ppsz_argv[], char *ppsz_env[])
/* Destroy the vlc structure */
vlc_destroy
(
p_vlc
);
return
0
;
return
err
;
}
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