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
a5d3d165
Commit
a5d3d165
authored
Jan 07, 2001
by
Henri Fallon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Order : if a then b are initialized, release b then a ; - Typos ; - Cosmetic changes.
parent
393a5d52
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
40 deletions
+42
-40
include/threads.h
include/threads.h
+6
-6
src/audio_output/audio_output.c
src/audio_output/audio_output.c
+1
-1
src/input/input.c
src/input/input.c
+2
-2
src/input/input_programs.c
src/input/input_programs.c
+16
-14
src/misc/modules.c
src/misc/modules.c
+1
-1
src/video_output/video_output.c
src/video_output/video_output.c
+14
-14
src/video_parser/video_parser.c
src/video_parser/video_parser.c
+2
-2
No files found.
include/threads.h
View file @
a5d3d165
...
...
@@ -152,7 +152,10 @@ static __inline__ int vlc_thread_create( vlc_thread_t *p_thread,
char
*
psz_name
,
vlc_thread_func_t
func
,
void
*
p_data
)
{
#if defined(HAVE_CTHREADS_H)
#if defined(HAVE_PTHREAD_H)
return
pthread_create
(
p_thread
,
NULL
,
func
,
p_data
);
#elif defined(HAVE_CTHREADS_H)
*
p_thread
=
cthread_fork
(
(
cthread_fn_t
)
func
,
(
any_t
)
p_data
);
return
0
;
...
...
@@ -161,9 +164,6 @@ static __inline__ int vlc_thread_create( vlc_thread_t *p_thread,
B_NORMAL_PRIORITY
,
p_data
);
return
resume_thread
(
*
p_thread
);
#elif defined(HAVE_PTHREAD_H)
return
pthread_create
(
p_thread
,
NULL
,
func
,
p_data
);
#endif
}
...
...
@@ -281,7 +281,7 @@ static __inline__ int vlc_mutex_unlock( vlc_mutex_t *p_mutex )
}
/*****************************************************************************
* vlc_mutex_destroy: dest
or
y a mutex
* vlc_mutex_destroy: dest
ro
y a mutex
*****************************************************************************/
static
__inline__
int
vlc_mutex_destroy
(
vlc_mutex_t
*
p_mutex
)
{
...
...
@@ -403,7 +403,7 @@ static __inline__ int vlc_cond_wait( vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex
}
/*****************************************************************************
* vlc_cond_dest
or
y: destroy a condition
* vlc_cond_dest
ro
y: destroy a condition
*****************************************************************************/
static
__inline__
int
vlc_cond_destroy
(
vlc_cond_t
*
p_condvar
)
{
...
...
src/audio_output/audio_output.c
View file @
a5d3d165
...
...
@@ -355,12 +355,12 @@ void aout_DestroyThread( aout_thread_t * p_aout, int *pi_status )
free
(
p_aout
->
s32_buffer
);
/* Destroy the condition and mutex locks */
vlc_mutex_destroy
(
&
p_aout
->
fifos_lock
);
for
(
i_fifo
=
0
;
i_fifo
<
AOUT_MAX_FIFOS
;
i_fifo
++
)
{
vlc_mutex_destroy
(
&
p_aout
->
fifo
[
i_fifo
].
data_lock
);
vlc_cond_destroy
(
&
p_aout
->
fifo
[
i_fifo
].
data_wait
);
}
vlc_mutex_destroy
(
&
p_aout
->
fifos_lock
);
/* Free the structure */
p_aout
->
p_sys_close
(
p_aout
);
...
...
src/input/input.c
View file @
a5d3d165
...
...
@@ -4,7 +4,7 @@
* decoders.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input.c,v 1.6
6 2001/01/07 03:56:40
henri Exp $
* $Id: input.c,v 1.6
7 2001/01/07 04:31:18
henri Exp $
*
* Authors:
*
...
...
@@ -319,8 +319,8 @@ static void EndThread( input_thread_t * p_input )
free
(
p_input
->
p_plugin
);
/* Destroy Mutex locks */
vlc_mutex_destroy
(
&
p_input
->
stream
.
stream_lock
);
vlc_mutex_destroy
(
&
p_input
->
stream
.
control
.
control_lock
);
vlc_mutex_destroy
(
&
p_input
->
stream
.
stream_lock
);
/* Free input structure */
free
(
p_input
);
...
...
src/input/input_programs.c
View file @
a5d3d165
...
...
@@ -2,7 +2,7 @@
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_programs.c,v 1.
19 2001/01/07 03:56:40
henri Exp $
* $Id: input_programs.c,v 1.
20 2001/01/07 04:31:18
henri Exp $
*
* Authors:
*
...
...
@@ -134,7 +134,7 @@ pgrm_descriptor_t * input_AddProgram( input_thread_t * p_input,
if
(
p_input
->
stream
.
pp_programs
==
NULL
)
{
intf_ErrMsg
(
"Unable to realloc memory in input_AddProgram"
);
return
NULL
;
return
(
NULL
)
;
}
/* Allocate the structure to store this description */
...
...
@@ -143,7 +143,7 @@ pgrm_descriptor_t * input_AddProgram( input_thread_t * p_input,
if
(
p_input
->
stream
.
pp_programs
[
i_pgrm_index
]
==
NULL
)
{
intf_ErrMsg
(
"Unable to allocate memory in input_AddProgram"
);
return
NULL
;
return
(
NULL
)
;
}
/* Init this entry */
...
...
@@ -174,7 +174,7 @@ pgrm_descriptor_t * input_AddProgram( input_thread_t * p_input,
if
(
p_input
->
stream
.
pp_programs
[
i_pgrm_index
]
->
p_demux_data
==
NULL
)
{
intf_ErrMsg
(
"Unable to allocate memory in input_AddProgram"
);
return
NULL
;
return
(
NULL
)
;
}
memset
(
p_input
->
stream
.
pp_programs
[
i_pgrm_index
]
->
p_demux_data
,
0
,
i_data_len
);
...
...
@@ -272,7 +272,7 @@ es_descriptor_t * input_AddES( input_thread_t * p_input,
if
(
p_es
==
NULL
)
{
intf_ErrMsg
(
"Unable to allocate memory in input_AddES"
);
return
NULL
;
return
(
NULL
)
;
}
p_input
->
stream
.
i_es_number
++
;
p_input
->
stream
.
pp_es
=
realloc
(
p_input
->
stream
.
pp_es
,
...
...
@@ -281,7 +281,7 @@ es_descriptor_t * input_AddES( input_thread_t * p_input,
if
(
p_input
->
stream
.
pp_es
==
NULL
)
{
intf_ErrMsg
(
"Unable to realloc memory in input_AddES"
);
return
NULL
;
return
(
NULL
)
;
}
p_input
->
stream
.
pp_es
[
p_input
->
stream
.
i_es_number
-
1
]
=
p_es
;
p_es
->
i_id
=
i_es_id
;
...
...
@@ -297,7 +297,7 @@ es_descriptor_t * input_AddES( input_thread_t * p_input,
if
(
p_es
->
p_demux_data
==
NULL
)
{
intf_ErrMsg
(
"Unable to allocate memory in input_AddES"
);
return
NULL
;
return
(
NULL
)
;
}
memset
(
p_es
->
p_demux_data
,
0
,
i_data_len
);
}
...
...
@@ -316,7 +316,7 @@ es_descriptor_t * input_AddES( input_thread_t * p_input,
if
(
p_pgrm
->
pp_es
==
NULL
)
{
intf_ErrMsg
(
"Unable to realloc memory in input_AddES"
);
return
NULL
;
return
(
NULL
)
;
}
p_pgrm
->
pp_es
[
p_pgrm
->
i_es_number
-
1
]
=
p_es
;
p_es
->
p_pgrm
=
p_pgrm
;
...
...
@@ -477,16 +477,17 @@ static vdec_config_t * GetVdecConfig( input_thread_t * p_input,
{
vdec_config_t
*
p_config
;
if
(
(
p_config
=
(
vdec_config_t
*
)
malloc
(
sizeof
(
vdec_config_t
)
))
==
NULL
)
p_config
=
(
vdec_config_t
*
)
malloc
(
sizeof
(
vdec_config_t
)
);
if
(
p_config
==
NULL
)
{
intf_ErrMsg
(
"Unable to allocate memory in GetVdecConfig"
);
return
NULL
;
return
(
NULL
)
;
}
p_config
->
p_vout
=
p_input
->
p_default_vout
;
if
(
InitDecConfig
(
p_input
,
p_es
,
&
p_config
->
decoder_config
)
==
-
1
)
{
free
(
p_config
);
return
NULL
;
return
(
NULL
)
;
}
return
(
p_config
);
...
...
@@ -500,16 +501,17 @@ static adec_config_t * GetAdecConfig( input_thread_t * p_input,
{
adec_config_t
*
p_config
;
if
(
(
p_config
=
(
adec_config_t
*
)
malloc
(
sizeof
(
adec_config_t
)))
==
NULL
)
p_config
=
(
adec_config_t
*
)
malloc
(
sizeof
(
adec_config_t
));
if
(
p_config
==
NULL
)
{
intf_ErrMsg
(
"Unable to allocate memory in GetAdecConfig"
);
return
NULL
;
return
(
NULL
)
;
}
p_config
->
p_aout
=
p_input
->
p_default_aout
;
if
(
InitDecConfig
(
p_input
,
p_es
,
&
p_config
->
decoder_config
)
==
-
1
)
{
free
(
p_config
);
return
NULL
;
return
(
NULL
)
;
}
return
(
p_config
);
...
...
src/misc/modules.c
View file @
a5d3d165
...
...
@@ -174,7 +174,7 @@ void module_DestroyBank( module_bank_t * p_bank )
}
}
/* Dest
or
y the lock */
/* Dest
ro
y the lock */
vlc_mutex_destroy
(
&
p_bank
->
lock
);
/* We can free the module bank */
...
...
src/video_output/video_output.c
View file @
a5d3d165
...
...
@@ -730,29 +730,29 @@ picture_t *vout_CreatePicture( vout_thread_t *p_vout, int i_type,
*****************************************************************************/
void
vout_DestroyPicture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
)
{
vlc_mutex_lock
(
&
p_vout
->
picture_lock
);
vlc_mutex_lock
(
&
p_vout
->
picture_lock
);
#ifdef DEBUG
/* Check if picture status is valid */
if
(
(
p_pic
->
i_status
!=
RESERVED_PICTURE
)
&&
(
p_pic
->
i_status
!=
RESERVED_DATED_PICTURE
)
&&
(
p_pic
->
i_status
!=
RESERVED_DISP_PICTURE
)
)
{
intf_DbgMsg
(
"error: picture %p has invalid status %d"
,
p_pic
,
p_pic
->
i_status
);
}
/* Check if picture status is valid */
if
(
(
p_pic
->
i_status
!=
RESERVED_PICTURE
)
&&
(
p_pic
->
i_status
!=
RESERVED_DATED_PICTURE
)
&&
(
p_pic
->
i_status
!=
RESERVED_DISP_PICTURE
)
)
{
intf_DbgMsg
(
"error: picture %p has invalid status %d"
,
p_pic
,
p_pic
->
i_status
);
}
#endif
p_pic
->
i_status
=
DESTROYED_PICTURE
;
p_vout
->
i_pictures
--
;
p_pic
->
i_status
=
DESTROYED_PICTURE
;
p_vout
->
i_pictures
--
;
#ifdef DEBUG_VOUT
intf_DbgMsg
(
"picture %p"
,
p_pic
);
intf_DbgMsg
(
"picture %p"
,
p_pic
);
#endif
/* destroy the lock that had been initialized in CreatePicture */
vlc_mutex_destroy
(
&
(
p_pic
->
lock_deccount
)
);
/* destroy the lock that had been initialized in CreatePicture */
vlc_mutex_destroy
(
&
(
p_pic
->
lock_deccount
)
);
vlc_mutex_unlock
(
&
p_vout
->
picture_lock
);
vlc_mutex_unlock
(
&
p_vout
->
picture_lock
);
}
/*****************************************************************************
...
...
src/video_parser/video_parser.c
View file @
a5d3d165
...
...
@@ -2,7 +2,7 @@
* video_parser.c : video parser thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_parser.c,v 1.6
2 2001/01/07 03:56:40
henri Exp $
* $Id: video_parser.c,v 1.6
3 2001/01/07 04:31:18
henri Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
...
...
@@ -387,9 +387,9 @@ static void EndThread( vpar_thread_t *p_vpar )
#ifdef VDEC_SMP
/* Destroy lock and cond */
vlc_mutex_destroy
(
&
(
p_vpar
->
vfifo
.
lock
)
);
vlc_mutex_destroy
(
&
(
p_vpar
->
vbuffer
.
lock
)
);
vlc_cond_destroy
(
&
(
p_vpar
->
vfifo
.
wait
)
);
vlc_mutex_destroy
(
&
(
p_vpar
->
vfifo
.
lock
)
);
#endif
vlc_mutex_destroy
(
&
(
p_vpar
->
synchro
.
fifo_lock
)
);
...
...
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