Commit a18c4d65 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

thread: remove vlc_cond_destroy()

parent a3226cf8
......@@ -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 );
......
......@@ -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.
*
......
......@@ -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;
......
......@@ -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);
}
......
......@@ -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 );
......
......@@ -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 )
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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 );
}
......@@ -878,8 +878,6 @@ out:
if (ret != VLC_SUCCESS)
retValue = false;
vlc_cond_destroy(&w.cond);
return retValue;
}
......
......@@ -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 );
......
......@@ -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 );
}
......
......@@ -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);
}
......
......@@ -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 );
}
......
......@@ -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);
......
......@@ -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;
......
......@@ -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,
......
......@@ -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)
......
......@@ -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 );
}
......
......@@ -89,8 +89,6 @@ PlaylistManager::~PlaylistManager ()
delete playlist;
delete logic;
delete resources;
vlc_cond_destroy(&waitcond);
vlc_cond_destroy(&demux.cond);
}
void PlaylistManager::unsetPeriod()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment