Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Samo Golež
VLC
Commits
a18c4d65
Commit
a18c4d65
authored
Feb 20, 2020
by
Rémi Denis-Courmont
Browse files
thread: remove vlc_cond_destroy()
parent
a3226cf8
Changes
65
Hide whitespace changes
Inline
Side-by-side
include/vlc_cxx_helpers.hpp
View file @
a18c4d65
...
...
@@ -309,10 +309,6 @@ public:
{
vlc_cond_init
(
&
m_cond
);
}
~
condition_variable
()
{
vlc_cond_destroy
(
&
m_cond
);
}
void
signal
()
noexcept
{
vlc_cond_signal
(
&
m_cond
);
...
...
include/vlc_threads.h
View file @
a18c4d65
...
...
@@ -457,14 +457,6 @@ VLC_API void vlc_cond_init(vlc_cond_t *);
*/
void
vlc_cond_init_daytime
(
vlc_cond_t
*
);
/**
* Deinitializes a condition variable.
*
* No threads shall be waiting or signaling the condition, otherwise the
* behavior is undefined.
*/
VLC_API
void
vlc_cond_destroy
(
vlc_cond_t
*
);
/**
* Wakes up one thread waiting on a condition variable.
*
...
...
lib/media.c
View file @
a18c4d65
...
...
@@ -562,8 +562,6 @@ void libvlc_media_release( libvlc_media_t *p_md )
input_item_Release
(
p_md
->
p_input_item
);
vlc_cond_destroy
(
&
p_md
->
parsed_cond
);
/* Construct the event */
libvlc_event_t
event
;
event
.
type
=
libvlc_MediaFreed
;
...
...
lib/media_list_player.c
View file @
a18c4d65
...
...
@@ -497,7 +497,6 @@ libvlc_media_list_player_new(libvlc_instance_t * p_instance)
return
p_mlp
;
error:
libvlc_event_manager_destroy
(
&
p_mlp
->
event_manager
);
vlc_cond_destroy
(
&
p_mlp
->
seek_pending
);
free
(
p_mlp
);
return
NULL
;
}
...
...
@@ -541,7 +540,6 @@ void libvlc_media_list_player_release(libvlc_media_list_player_t * p_mlp)
unlock
(
p_mlp
);
libvlc_event_manager_destroy
(
&
p_mlp
->
event_manager
);
vlc_cond_destroy
(
&
p_mlp
->
seek_pending
);
free
(
p_mlp
->
current_playing_item_path
);
free
(
p_mlp
);
}
...
...
modules/access/dshow/dshow.cpp
View file @
a18c4d65
...
...
@@ -816,8 +816,6 @@ static void CommonClose( vlc_object_t *p_this, access_sys_t *p_sys )
vlc_delete_all
(
p_sys
->
pp_streams
);
vlc_cond_destroy
(
&
p_sys
->
wait
);
vlc_mta_release
(
p_this
);
free
(
p_sys
);
...
...
modules/access/dtv/bdagraph.cpp
View file @
a18c4d65
...
...
@@ -321,7 +321,6 @@ BDAOutput::BDAOutput( vlc_object_t *p_access ) :
BDAOutput
::~
BDAOutput
()
{
Empty
();
vlc_cond_destroy
(
&
wait
);
}
void
BDAOutput
::
Push
(
block_t
*
p_block
)
...
...
modules/access/http/h2conn.c
View file @
a18c4d65
...
...
@@ -391,7 +391,6 @@ static void vlc_h2_stream_close(struct vlc_http_stream *stream, bool aborted)
free
(
f
);
}
vlc_cond_destroy
(
&
s
->
recv_wait
);
free
(
s
);
if
(
destroy
)
...
...
@@ -464,7 +463,6 @@ static struct vlc_http_stream *vlc_h2_stream_open(struct vlc_http_conn *c,
error:
vlc_mutex_unlock
(
&
conn
->
lock
);
vlc_cond_destroy
(
&
s
->
recv_wait
);
free
(
s
);
return
NULL
;
}
...
...
modules/access/http/h2output.c
View file @
a18c4d65
...
...
@@ -322,7 +322,6 @@ struct vlc_h2_output *vlc_h2_output_create(struct vlc_tls *tls, bool client)
:
vlc_h2_output_thread
;
if
(
vlc_clone
(
&
out
->
thread
,
cb
,
out
,
VLC_THREAD_PRIORITY_INPUT
))
{
vlc_cond_destroy
(
&
out
->
wait
);
free
(
out
);
out
=
NULL
;
}
...
...
@@ -339,7 +338,6 @@ void vlc_h2_output_destroy(struct vlc_h2_output *out)
vlc_cancel
(
out
->
thread
);
vlc_join
(
out
->
thread
,
NULL
);
vlc_cond_destroy
(
&
out
->
wait
);
/* Flush queues in case the thread was terminated within poll() and some
* packets were still queued. */
vlc_h2_output_flush_unlocked
(
out
);
...
...
modules/audio_output/audiotrack.c
View file @
a18c4d65
...
...
@@ -2246,7 +2246,5 @@ Close( vlc_object_t *obj )
audio_output_t
*
p_aout
=
(
audio_output_t
*
)
obj
;
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
vlc_cond_destroy
(
&
p_sys
->
aout_cond
);
vlc_cond_destroy
(
&
p_sys
->
thread_cond
);
free
(
p_sys
);
}
modules/audio_output/auhal.c
View file @
a18c4d65
...
...
@@ -878,8 +878,6 @@ out:
if
(
ret
!=
VLC_SUCCESS
)
retValue
=
false
;
vlc_cond_destroy
(
&
w
.
cond
);
return
retValue
;
}
...
...
modules/audio_output/directsound.c
View file @
a18c4d65
...
...
@@ -552,7 +552,6 @@ static HRESULT Stop( aout_stream_sys_t *p_sys )
vlc_mutex_unlock
(
&
p_sys
->
lock
);
vlc_cancel
(
p_sys
->
eraser_thread
);
vlc_join
(
p_sys
->
eraser_thread
,
NULL
);
vlc_cond_destroy
(
&
p_sys
->
cond
);
if
(
p_sys
->
p_notify
!=
NULL
)
{
...
...
@@ -659,10 +658,7 @@ static HRESULT Start( vlc_object_t *obj, aout_stream_sys_t *sys,
fmt
.
i_frame_length
=
A52_FRAME_NB
;
}
else
{
vlc_cond_destroy
(
&
sys
->
cond
);
return
E_FAIL
;
}
}
if
(
hr
!=
DS_OK
)
...
...
@@ -805,8 +801,6 @@ static HRESULT Start( vlc_object_t *obj, aout_stream_sys_t *sys,
return
DS_OK
;
error:
vlc_cond_destroy
(
&
sys
->
cond
);
if
(
sys
->
p_notify
!=
NULL
)
{
IDirectSoundNotify_Release
(
sys
->
p_notify
);
...
...
modules/audio_output/kai.c
View file @
a18c4d65
...
...
@@ -371,8 +371,6 @@ static void DestroyBuffer( audio_output_t *aout )
aout_sys_t
*
sys
=
aout
->
sys
;
audio_buffer_t
*
buffer
=
sys
->
buffer
;
vlc_cond_destroy
(
&
buffer
->
cond
);
free
(
buffer
->
data
);
free
(
buffer
);
}
...
...
modules/audio_output/waveout.c
View file @
a18c4d65
...
...
@@ -823,8 +823,6 @@ static void Close(vlc_object_t *obj)
var_Destroy
(
aout
,
"waveout-audio-device"
);
vlc_timer_destroy
(
sys
->
volume_poll_timer
);
vlc_cond_destroy
(
&
sys
->
cond
);
free
(
sys
);
}
...
...
modules/codec/dmo/dmo.c
View file @
a18c4d65
...
...
@@ -273,8 +273,6 @@ found:
vlc_join
(
p_sys
->
thread
,
NULL
);
error:
vlc_cond_destroy
(
&
p_sys
->
wait_input
);
vlc_cond_destroy
(
&
p_sys
->
wait_output
);
free
(
p_sys
);
return
VLC_ENOMEM
;
}
...
...
@@ -293,8 +291,6 @@ static void DecoderClose( vlc_object_t *p_this )
vlc_mutex_unlock
(
&
p_sys
->
lock
);
vlc_join
(
p_sys
->
thread
,
NULL
);
vlc_cond_destroy
(
&
p_sys
->
wait_input
);
vlc_cond_destroy
(
&
p_sys
->
wait_output
);
free
(
p_sys
);
}
...
...
modules/codec/omxil/mediacodec.c
View file @
a18c4d65
...
...
@@ -1004,9 +1004,6 @@ static void AbortDecoderLocked(decoder_t *p_dec)
static
void
CleanDecoder
(
decoder_sys_t
*
p_sys
)
{
vlc_cond_destroy
(
&
p_sys
->
cond
);
vlc_cond_destroy
(
&
p_sys
->
dec_cond
);
StopMediaCodec
(
p_sys
);
CSDFree
(
p_sys
);
...
...
modules/codec/omxil/omxil_utils.h
View file @
a18c4d65
...
...
@@ -88,7 +88,7 @@ static inline OMX_TICKS ToOmxTicks(int64_t value)
(p_fifo)->pp_last = &(p_fifo)->p_first; } while(0)
#define OMX_FIFO_DESTROY(p_fifo) \
do { vlc_cond_destroy (&(p_fifo)->wait); }
while(0)
while(0)
{ }
#define OMX_FIFO_PEEK(p_fifo, p_buffer) \
p_buffer = (p_fifo)->p_first;
...
...
modules/codec/omxil/utils.c
View file @
a18c4d65
...
...
@@ -50,7 +50,7 @@ void InitOmxEventQueue(OmxEventQueue *queue)
void
DeinitOmxEventQueue
(
OmxEventQueue
*
queue
)
{
vlc_cond_destroy
(
&
queue
->
cond
)
;
(
void
)
queue
;
}
OMX_ERRORTYPE
PostOmxEvent
(
OmxEventQueue
*
queue
,
OMX_EVENTTYPE
event
,
...
...
modules/codec/videotoolbox.c
View file @
a18c4d65
...
...
@@ -1302,9 +1302,7 @@ static void StopVideoToolbox(decoder_t *p_dec, bool closing)
static
void
pic_pacer_Destroy
(
void
*
priv
)
{
struct
pic_pacer
*
pic_pacer
=
priv
;
vlc_cond_destroy
(
&
pic_pacer
->
wait
);
(
void
)
priv
;
}
static
void
pic_pacer_Init
(
struct
pic_pacer
*
pic_pacer
,
uint8_t
pic_reorder_max
)
...
...
modules/control/globalhotkeys/win32.c
View file @
a18c4d65
...
...
@@ -79,7 +79,6 @@ static int Open( vlc_object_t *p_this )
if
(
vlc_clone
(
&
p_sys
->
thread
,
Thread
,
p_intf
,
VLC_THREAD_PRIORITY_LOW
)
)
{
vlc_cond_destroy
(
&
p_sys
->
wait
);
free
(
p_sys
);
p_intf
->
p_sys
=
NULL
;
...
...
@@ -93,7 +92,6 @@ static int Open( vlc_object_t *p_this )
{
vlc_mutex_unlock
(
&
p_sys
->
lock
);
vlc_join
(
p_sys
->
thread
,
NULL
);
vlc_cond_destroy
(
&
p_sys
->
wait
);
free
(
p_sys
);
p_intf
->
p_sys
=
NULL
;
...
...
@@ -119,7 +117,6 @@ static void Close( vlc_object_t *p_this )
vlc_mutex_unlock
(
&
p_sys
->
lock
);
vlc_join
(
p_sys
->
thread
,
NULL
);
vlc_cond_destroy
(
&
p_sys
->
wait
);
free
(
p_sys
);
}
...
...
modules/demux/adaptive/PlaylistManager.cpp
View file @
a18c4d65
...
...
@@ -89,8 +89,6 @@ PlaylistManager::~PlaylistManager ()
delete
playlist
;
delete
logic
;
delete
resources
;
vlc_cond_destroy
(
&
waitcond
);
vlc_cond_destroy
(
&
demux
.
cond
);
}
void
PlaylistManager
::
unsetPeriod
()
...
...
Prev
1
2
3
4
Next
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