thread: remove vlc_mutex_destroy()
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 20 Feb 2020 19:39:27 +0000 (21:39 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Fri, 21 Feb 2020 17:16:09 +0000 (19:16 +0200)
165 files changed:
include/vlc_cxx_helpers.hpp
include/vlc_threads.h
lib/core.c
lib/event.c
lib/media.c
lib/media_list.c
lib/media_list_player.c
modules/access/bluray.c
modules/access/decklink.cpp
modules/access/dshow/dshow.cpp
modules/access/dtv/bdagraph.cpp
modules/access/dv.c
modules/access/dvdnav.c
modules/access/http/h2conn.c
modules/access/http/h2output.c
modules/access/mms/mmstu.c
modules/access/rist.c
modules/access/srt.c
modules/access_output/rist.c
modules/access_output/srt.c
modules/audio_filter/compressor.c
modules/audio_filter/equalizer.c
modules/audio_filter/spatializer/spatializer.cpp
modules/audio_output/amem.c
modules/audio_output/audiotrack.c
modules/audio_output/audiounit_ios.m
modules/audio_output/auhal.c
modules/audio_output/coreaudio_common.c
modules/audio_output/coreaudio_common.h
modules/audio_output/directsound.c
modules/audio_output/kai.c
modules/audio_output/opensles_android.c
modules/audio_output/waveout.c
modules/codec/avcodec/video.c
modules/codec/dmo/dmo.c
modules/codec/kate.c
modules/codec/libass.c
modules/codec/omxil/mediacodec.c
modules/codec/omxil/omxil_utils.h
modules/codec/omxil/utils.c
modules/codec/videotoolbox.c
modules/codec/zvbi.c
modules/control/dbus/dbus.c
modules/control/gestures.c
modules/control/globalhotkeys/win32.c
modules/control/rc.c
modules/demux/adaptive/PlaylistManager.cpp
modules/demux/adaptive/Streams.cpp
modules/demux/adaptive/encryption/Keyring.cpp
modules/demux/adaptive/http/Chunk.cpp
modules/demux/adaptive/http/Downloader.cpp
modules/demux/adaptive/http/HTTPConnectionManager.cpp
modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp
modules/demux/adaptive/logic/PredictiveAdaptationLogic.cpp
modules/demux/adaptive/logic/RateBasedAdaptationLogic.cpp
modules/demux/adaptive/plumbing/FakeESOut.cpp
modules/demux/mkv/demux.cpp
modules/demux/mkv/events.cpp
modules/demux/mpeg/ts.c
modules/gui/ncurses.c
modules/gui/qt/medialibrary/mlbasemodel.cpp
modules/gui/skins2/commands/async_queue.cpp
modules/gui/skins2/commands/cmd_callbacks.hpp
modules/hw/d3d11/d3d11_surface.c
modules/hw/mmal/codec.c
modules/hw/mmal/converter.c
modules/hw/mmal/mmal_cma.c
modules/hw/mmal/mmal_picture.c
modules/hw/mmal/vout.c
modules/keystore/memory.c
modules/lua/extension.c
modules/lua/libs/dialog.c
modules/lua/services_discovery.c
modules/misc/audioscrobbler.c
modules/misc/fingerprinter.c
modules/misc/rtsp.c
modules/misc/securetransport.c
modules/mux/mpeg/ts.c
modules/notify/notify.c
modules/services_discovery/podcast.c
modules/spu/audiobargraph_v.c
modules/spu/dynamicoverlay/dynamicoverlay.c
modules/spu/logo.c
modules/spu/marq.c
modules/spu/mosaic.c
modules/spu/rss.c
modules/spu/subsdelay.c
modules/stream_filter/decomp.c
modules/stream_filter/hds/hds.c
modules/stream_filter/prefetch.c
modules/stream_out/chromecast/cast.cpp
modules/stream_out/rtp.c
modules/stream_out/rtsp.c
modules/stream_out/sdi/DBMSDIOutput.cpp
modules/stream_out/sdi/SDIStream.cpp
modules/stream_out/transcode/encoder/encoder.c
modules/stream_out/transcode/transcode.c
modules/video_filter/alphamask.c
modules/video_filter/ball.c
modules/video_filter/bluescreen.c
modules/video_filter/erase.c
modules/video_filter/extract.c
modules/video_filter/gradfun.c
modules/video_filter/gradient.c
modules/video_filter/grain.c
modules/video_filter/hqdn3d.c
modules/video_filter/postproc.c
modules/video_filter/puzzle.c
modules/video_output/decklink.cpp
modules/video_output/ios.m
modules/video_output/splitter.c
modules/video_output/wayland/xdg-shell.c
modules/video_output/win32/events.c
modules/video_output/win32/inhibit.c
modules/visualization/goom.c
modules/visualization/projectm.cpp
modules/visualization/vsxu.cpp
src/android/thread.c
src/audio_output/output.c
src/clock/clock.c
src/clock/input_clock.c
src/input/decoder.c
src/input/demux_chained.c
src/input/es_out.c
src/input/es_out_timeshift.c
src/input/input.c
src/input/item.c
src/input/resource.c
src/input/stats.c
src/input/thumbnailer.c
src/input/vlm.c
src/interface/dialog.c
src/libvlc.c
src/libvlc.h
src/libvlccore.sym
src/media_source/media_source.c
src/media_source/media_tree.c
src/misc/addons.c
src/misc/background_worker.c
src/misc/events.c
src/misc/exit.c
src/misc/fifo.c
src/misc/httpcookies.c
src/misc/interrupt.c
src/misc/medialibrary.c
src/misc/messages.c
src/misc/objects.c
src/misc/picture_fifo.c
src/misc/picture_pool.c
src/misc/threads.c
src/misc/update.c
src/network/httpd.c
src/os2/thread.c
src/player/player.c
src/player/timer.c
src/posix/timer.c
src/preparser/fetcher.c
src/stream_output/stream_output.c
src/test/timer.c
src/video_output/control.c
src/video_output/opengl.c
src/video_output/snapshot.c
src/video_output/video_output.c
src/video_output/vout_subpictures.c
src/video_output/window.c

index 2f25601..6717540 100644 (file)
@@ -281,10 +281,6 @@ public:
     {
         vlc_mutex_init( &m_mutex );
     }
-    ~mutex()
-    {
-        vlc_mutex_destroy( &m_mutex );
-    }
 
     mutex( const mutex& ) = delete;
     mutex& operator=( const mutex& ) = delete;
index 4800846..c87eac7 100644 (file)
@@ -344,13 +344,6 @@ VLC_API void vlc_mutex_init(vlc_mutex_t *);
  */
 VLC_API void vlc_mutex_init_recursive(vlc_mutex_t *);
 
-/**
- * Deinitializes a mutex.
- *
- * The mutex must not be locked, otherwise behaviour is undefined.
- */
-VLC_API void vlc_mutex_destroy(vlc_mutex_t *);
-
 /**
  * Acquires a mutex.
  *
index 52549a1..56b985f 100644 (file)
@@ -93,7 +93,6 @@ void libvlc_release( libvlc_instance_t *p_instance )
 
     if( refs == 0 )
     {
-        vlc_mutex_destroy( lock );
         libvlc_Quit( p_instance->p_libvlc_int );
         libvlc_InternalCleanup( p_instance->p_libvlc_int );
         libvlc_InternalDestroy( p_instance->p_libvlc_int );
index 28d3d0c..96a17e1 100644 (file)
@@ -90,8 +90,6 @@ void libvlc_event_manager_init(libvlc_event_manager_t *em, void *obj)
 
 void libvlc_event_manager_destroy(libvlc_event_manager_t *em)
 {
-    vlc_mutex_destroy(&em->lock);
-
     for (size_t i = 0; i < vlc_array_count(&em->listeners); i++)
         free(vlc_array_item_at_index(&em->listeners, i));
 
index f045c72..b2277e5 100644 (file)
@@ -563,8 +563,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 );
-    vlc_mutex_destroy( &p_md->parsed_lock );
-    vlc_mutex_destroy( &p_md->subitems_lock );
 
     /* Construct the event */
     libvlc_event_t event;
index c4584c3..e8a8a25 100644 (file)
@@ -202,8 +202,6 @@ void libvlc_media_list_release( libvlc_media_list_t * p_mlist )
         libvlc_media_release( p_md );
     }
 
-    vlc_mutex_destroy( &p_mlist->object_lock );
-    vlc_mutex_destroy( &p_mlist->refcount_lock );
     vlc_array_clear( &p_mlist->items );
 
     libvlc_release( p_mlist->p_libvlc_instance );
index 6a96f5a..6e02a80 100644 (file)
@@ -498,8 +498,6 @@ libvlc_media_list_player_new(libvlc_instance_t * p_instance)
 error:
     libvlc_event_manager_destroy(&p_mlp->event_manager);
     vlc_cond_destroy(&p_mlp->seek_pending);
-    vlc_mutex_destroy(&p_mlp->mp_callback_lock);
-    vlc_mutex_destroy(&p_mlp->object_lock);
     free(p_mlp);
     return NULL;
 }
@@ -544,9 +542,6 @@ void libvlc_media_list_player_release(libvlc_media_list_player_t * p_mlp)
 
     libvlc_event_manager_destroy(&p_mlp->event_manager);
     vlc_cond_destroy(&p_mlp->seek_pending);
-    vlc_mutex_destroy(&p_mlp->mp_callback_lock);
-    vlc_mutex_destroy(&p_mlp->object_lock);
-
     free(p_mlp->current_playing_item_path);
     free(p_mlp);
 }
index a299878..90b811e 100644 (file)
@@ -476,10 +476,8 @@ static void unref_subpicture_updater(bluray_spu_updater_sys_t *p_sys)
     p_sys->p_overlay = NULL;
     vlc_mutex_unlock(&p_sys->lock);
 
-    if (refs < 1) {
-        vlc_mutex_destroy(&p_sys->lock);
+    if (refs < 1)
         free(p_sys);
-    }
 }
 
 /* Get a 3 char code
@@ -1131,10 +1129,6 @@ static void blurayClose(vlc_object_t *object)
 
     ARRAY_RESET(p_sys->events_delayed);
 
-    vlc_mutex_destroy(&p_sys->pl_info_lock);
-    vlc_mutex_destroy(&p_sys->bdj.lock);
-    vlc_mutex_destroy(&p_sys->read_block_lock);
-
     free(p_sys->psz_bd_path);
 }
 
@@ -1576,7 +1570,6 @@ static void bluray_esOutDestroy(es_out_t *p_out)
     for (size_t i = 0; i < vlc_array_count(&esout_priv->es); ++i)
         es_pair_Delete(vlc_array_item_at_index(&esout_priv->es, i));
     vlc_array_clear(&esout_priv->es);
-    vlc_mutex_destroy(&esout_priv->lock);
     free(esout_priv);
 }
 
@@ -1804,7 +1797,6 @@ static void blurayCloseOverlay(demux_t *p_demux, int plane)
         /* no references to this overlay exist in vo anymore */
         es_out_Control(p_sys->p_out, BLURAY_ES_OUT_CONTROL_DELETE_OVERLAY, plane);
 
-        vlc_mutex_destroy(&ov->lock);
         subpicture_region_ChainDelete(ov->p_regions);
         free(ov);
 
index d2ba30e..e24fd12 100644 (file)
@@ -782,7 +782,6 @@ static void Close(vlc_object_t *p_this)
     if (sys->delegate)
         sys->delegate->Release();
 
-    vlc_mutex_destroy(&sys->pts_lock);
     free(sys);
 }
 
index f5a6604..d977070 100644 (file)
@@ -816,7 +816,6 @@ static void CommonClose( vlc_object_t *p_this, access_sys_t *p_sys )
 
     vlc_delete_all( p_sys->pp_streams );
 
-    vlc_mutex_destroy( &p_sys->lock );
     vlc_cond_destroy( &p_sys->wait );
 
     vlc_mta_release( p_this );
index 77d42ee..62a6133 100644 (file)
@@ -321,7 +321,6 @@ BDAOutput::BDAOutput( vlc_object_t *p_access ) :
 BDAOutput::~BDAOutput()
 {
     Empty();
-    vlc_mutex_destroy( &lock );
     vlc_cond_destroy( &wait );
 }
 
index 14d538f..8a8baa1 100644 (file)
@@ -238,7 +238,6 @@ static void Close( vlc_object_t *p_this )
             raw1394_iso_shutdown( p_sys->p_raw1394 );
 
         vlc_join( p_sys->p_ev->thread, NULL );
-        vlc_mutex_destroy( &p_sys->p_ev->lock );
 
         /* Cleanup frame data */
         if( p_sys->p_ev->p_frame )
@@ -256,8 +255,6 @@ static void Close( vlc_object_t *p_this )
         raw1394_destroy_handle( p_sys->p_raw1394 );
 
     AVCClose( p_access );
-
-    vlc_mutex_destroy( &p_sys->lock );
 }
 
 /*****************************************************************************
index fb1b1ae..3b18266 100644 (file)
@@ -487,8 +487,6 @@ static void Close( vlc_object_t *p_this )
     /* Stop still image handler */
     if( p_sys->still.b_created )
         vlc_timer_destroy( p_sys->still.timer );
-    vlc_mutex_destroy( &p_sys->still.lock );
-    vlc_mutex_destroy( &p_sys->event_lock );
 
     for( int i = 0; i < PS_TK_COUNT; i++ )
     {
index e2c9de6..20c7e5b 100644 (file)
@@ -740,7 +740,6 @@ static void vlc_h2_conn_destroy(struct vlc_h2_conn *conn)
 
     vlc_cancel(conn->thread);
     vlc_join(conn->thread, NULL);
-    vlc_mutex_destroy(&conn->lock);
 
     vlc_h2_output_destroy(conn->out);
     vlc_tls_Shutdown(conn->conn.tls, true);
@@ -796,7 +795,6 @@ struct vlc_http_conn *vlc_h2_conn_create(void *ctx, struct vlc_tls *tls)
      || vlc_clone(&conn->thread, vlc_h2_recv_thread, conn,
                   VLC_THREAD_PRIORITY_INPUT))
     {
-        vlc_mutex_destroy(&conn->lock);
         vlc_h2_output_destroy(conn->out);
         goto error;
     }
index bfb4120..1d038ec 100644 (file)
@@ -323,7 +323,6 @@ struct vlc_h2_output *vlc_h2_output_create(struct vlc_tls *tls, bool client)
     if (vlc_clone(&out->thread, cb, out, VLC_THREAD_PRIORITY_INPUT))
     {
         vlc_cond_destroy(&out->wait);
-        vlc_mutex_destroy(&out->lock);
         free(out);
         out = NULL;
     }
@@ -341,7 +340,6 @@ void vlc_h2_output_destroy(struct vlc_h2_output *out)
     vlc_join(out->thread, NULL);
 
     vlc_cond_destroy(&out->wait);
-    vlc_mutex_destroy(&out->lock);
     /* Flush queues in case the thread was terminated within poll() and some
      * packets were still queued. */
     vlc_h2_output_flush_unlocked(out);
index d96cf22..4c0c5a6 100644 (file)
@@ -110,7 +110,6 @@ int  MMSTUOpen( stream_t *p_access )
     {
         msg_Err( p_access, "invalid server name" );
         vlc_UrlClean( &p_sys->url );
-        vlc_mutex_destroy( &p_sys->lock_netwrite );
         free( p_sys );
         return VLC_EGENERIC;
     }
@@ -147,7 +146,6 @@ int  MMSTUOpen( stream_t *p_access )
     {
         msg_Err( p_access, "cannot connect to server" );
         vlc_UrlClean( &p_sys->url );
-        vlc_mutex_destroy( &p_sys->lock_netwrite );
         free( p_sys );
         return VLC_EGENERIC;
     }
index 0c0d49e..be4b0b8 100644 (file)
@@ -1035,8 +1035,6 @@ static void Clean( stream_t *p_access )
         free(p_sys->flow->buffer);
         free(p_sys->flow);
     }
-
-    vlc_mutex_destroy( &p_sys->lock );
 }
 
 static void Close(vlc_object_t *p_this)
index ac73fbc..ab52ba4 100644 (file)
@@ -390,8 +390,6 @@ static int Open(vlc_object_t *p_this)
     return VLC_SUCCESS;
 
 failed:
-    vlc_mutex_destroy( &p_sys->lock );
-
     if ( p_sys->sock != -1 ) srt_close( p_sys->sock );
     if ( p_sys->i_poll_id != -1 ) srt_epoll_release( p_sys->i_poll_id );
 
@@ -403,8 +401,6 @@ static void Close(vlc_object_t *p_this)
     stream_t     *p_stream = (stream_t*)p_this;
     stream_sys_t *p_sys = p_stream->p_sys;
 
-    vlc_mutex_destroy( &p_sys->lock );
-
     srt_epoll_remove_usock( p_sys->i_poll_id, p_sys->sock );
     srt_close( p_sys->sock );
     srt_epoll_release( p_sys->i_poll_id );
index 3f2f390..ca96701 100644 (file)
@@ -714,8 +714,6 @@ static void Clean( sout_access_out_t *p_access )
         free(p_sys->flow);
     }
 
-    vlc_mutex_destroy( &p_sys->lock );
-    vlc_mutex_destroy( &p_sys->fd_lock );
     if (p_sys->p_pktbuffer)
         block_Release(p_sys->p_pktbuffer);
 }
index da55a30..0b66f24 100644 (file)
@@ -402,8 +402,6 @@ static int Open( vlc_object_t *p_this )
     return VLC_SUCCESS;
 
 failed:
-    vlc_mutex_destroy( &p_sys->lock );
-
     if ( p_sys->sock != -1 ) srt_close( p_sys->sock );
     if ( p_sys->i_poll_id != -1 ) srt_epoll_release( p_sys->i_poll_id );
 
@@ -415,8 +413,6 @@ static void Close( vlc_object_t * p_this )
     sout_access_out_t     *p_access = (sout_access_out_t*)p_this;
     sout_access_out_sys_t *p_sys = p_access->p_sys;
 
-    vlc_mutex_destroy( &p_sys->lock );
-
     srt_epoll_remove_usock( p_sys->i_poll_id, p_sys->sock );
     srt_close( p_sys->sock );
     srt_epoll_release( p_sys->i_poll_id );
index 402cbb5..5aab1ce 100644 (file)
@@ -282,9 +282,6 @@ static void Close( vlc_object_t *p_this )
     var_DelCallback( p_aout, "compressor-knee", KneeCallback, p_sys );
     var_DelCallback( p_aout, "compressor-makeup-gain", MakeupGainCallback, p_sys );
 
-    /* Destroy the mutex */
-    vlc_mutex_destroy( &p_sys->lock );
-
     /* Destroy the filter parameter structure */
     free( p_sys );
 }
index c63547f..92ccaf8 100644 (file)
@@ -157,7 +157,6 @@ static int Open( vlc_object_t *p_this )
     vlc_mutex_init( &p_sys->lock );
     if( EqzInit( p_filter, p_filter->fmt_in.audio.i_rate ) != VLC_SUCCESS )
     {
-        vlc_mutex_destroy( &p_sys->lock );
         free( p_sys );
         return VLC_EGENERIC;
     }
@@ -179,7 +178,6 @@ static void Close( vlc_object_t *p_this )
     filter_sys_t *p_sys = p_filter->p_sys;
 
     EqzClean( p_filter );
-    vlc_mutex_destroy( &p_sys->lock );
     free( p_sys );
 }
 
index eccde13..4f9c19b 100644 (file)
@@ -192,7 +192,6 @@ static void Close( vlc_object_t *p_this )
     }
 
     delete p_sys->p_reverbm;
-    vlc_mutex_destroy( &p_sys->lock );
     free( p_sys );
     msg_Dbg( p_this, "Closing filter spatializer" );
 }
index f8f7627..176d223 100644 (file)
@@ -394,6 +394,5 @@ static void Close (vlc_object_t *obj)
     audio_output_t *aout = (audio_output_t *)obj;
     aout_sys_t *sys = aout->sys;
 
-    vlc_mutex_destroy(&sys->lock);
     free (sys);
 }
index 3fcd79c..683e16a 100644 (file)
@@ -2246,7 +2246,6 @@ Close( vlc_object_t *obj )
     audio_output_t *p_aout = (audio_output_t *) obj;
     aout_sys_t *p_sys = p_aout->sys;
 
-    vlc_mutex_destroy(&p_sys->lock);
     vlc_cond_destroy(&p_sys->aout_cond);
     vlc_cond_destroy(&p_sys->thread_cond);
     free( p_sys );
index 072de41..e0547b5 100644 (file)
@@ -611,7 +611,6 @@ Close(vlc_object_t *obj)
 
     [sys->aoutWrapper release];
 
-    ca_Close(aout);
     free(sys);
 }
 
@@ -636,7 +635,6 @@ Open(vlc_object_t *obj)
     sys->aoutWrapper = [[AoutWrapper alloc] initWithAout:aout];
     if (sys->aoutWrapper == NULL)
     {
-        ca_Close(aout);
         free(sys);
         return VLC_ENOMEM;
     }
index 6c96d80..434de23 100644 (file)
@@ -878,7 +878,6 @@ out:
     if (ret != VLC_SUCCESS)
         retValue = false;
 
-    vlc_mutex_destroy(&w.lock);
     vlc_cond_destroy(&w.cond);
 
     return retValue;
@@ -1689,10 +1688,6 @@ static void Close(vlc_object_t *obj)
     config_PutPsz("auhal-audio-device", psz_device);
     free(psz_device);
 
-    vlc_mutex_destroy(&p_sys->selected_device_lock);
-    vlc_mutex_destroy(&p_sys->device_list_lock);
-
-    ca_Close(p_aout);
     free(p_sys);
 }
 
index f38490e..900616a 100644 (file)
@@ -82,13 +82,6 @@ lock_init(struct aout_sys_common *p_sys)
         vlc_mutex_init(&p_sys->lock.mutex);
 }
 
-static inline void
-lock_destroy(struct aout_sys_common *p_sys)
-{
-    if (unlikely(!os_unfair_lock_lock))
-        vlc_mutex_destroy(&p_sys->lock.mutex);
-}
-
 static inline void
 lock_lock(struct aout_sys_common *p_sys)
 {
@@ -129,14 +122,6 @@ ca_Open(audio_output_t *p_aout)
     return VLC_SUCCESS;
 }
 
-void
-ca_Close(audio_output_t *p_aout)
-{
-    struct aout_sys_common *p_sys = (struct aout_sys_common *) p_aout->sys;
-
-    lock_destroy(p_sys);
-}
-
 /* Called from render callbacks. No lock, wait, and IO here */
 void
 ca_Render(audio_output_t *p_aout, uint32_t i_frames, uint64_t i_host_time,
index d6949b4..49f6779 100644 (file)
@@ -47,8 +47,7 @@
 
 struct aout_sys_common
 {
-    /* The following is owned by common.c (initialized from ca_Open, cleaned
-     * from ca_Close) */
+    /* The following is owned by common.c (initialized from ca_Open) */
 
     mach_timebase_info_data_t tinfo;
 
@@ -87,8 +86,6 @@ struct aout_sys_common
 
 int ca_Open(audio_output_t *p_aout);
 
-void ca_Close(audio_output_t *p_aout);
-
 void ca_Render(audio_output_t *p_aout, uint32_t i_nb_samples, uint64_t i_host_time,
                uint8_t *p_output, size_t i_requested);
 
index f4d7efe..9f3ec04 100644 (file)
@@ -553,7 +553,6 @@ static HRESULT Stop( aout_stream_sys_t *p_sys )
     vlc_cancel( p_sys->eraser_thread );
     vlc_join( p_sys->eraser_thread, NULL );
     vlc_cond_destroy( &p_sys->cond );
-    vlc_mutex_destroy( &p_sys->lock );
 
     if( p_sys->p_notify != NULL )
     {
@@ -661,7 +660,6 @@ static HRESULT Start( vlc_object_t *obj, aout_stream_sys_t *sys,
         }
         else
         {
-            vlc_mutex_destroy(&sys->lock);
             vlc_cond_destroy(&sys->cond);
             return E_FAIL;
         }
@@ -808,7 +806,6 @@ static HRESULT Start( vlc_object_t *obj, aout_stream_sys_t *sys,
 
 error:
     vlc_cond_destroy(&sys->cond);
-    vlc_mutex_destroy(&sys->lock);
 
     if( sys->p_notify != NULL )
     {
index dd75e36..b565619 100644 (file)
@@ -371,7 +371,6 @@ static void DestroyBuffer( audio_output_t *aout )
     aout_sys_t     *sys = aout->sys;
     audio_buffer_t *buffer = sys->buffer;
 
-    vlc_mutex_destroy( &buffer->mutex );
     vlc_cond_destroy( &buffer->cond );
 
     free( buffer->data );
index b1c2a0d..424baf2 100644 (file)
@@ -521,7 +521,6 @@ static void Close(vlc_object_t *obj)
     Destroy(sys->outputMixObject);
     Destroy(sys->engineObject);
     dlclose(sys->p_so_handle);
-    vlc_mutex_destroy(&sys->lock);
     free(sys);
 }
 
index 990b1e8..e3c06bb 100644 (file)
@@ -824,7 +824,6 @@ static void Close(vlc_object_t *obj)
 
     vlc_timer_destroy( sys->volume_poll_timer );
     vlc_cond_destroy( &sys->cond );
-    vlc_mutex_destroy( &sys->lock );
 
     free(sys);
 }
index 8e35104..b2d5271 100644 (file)
@@ -693,7 +693,6 @@ int InitVideoDec( vlc_object_t *obj )
     /* ***** Open the codec ***** */
     if( OpenVideoCodec( p_dec ) < 0 )
     {
-        vlc_mutex_destroy( &p_sys->lock );
         free( p_sys );
         avcodec_free_context( &p_context );
         return VLC_EGENERIC;
@@ -1403,7 +1402,6 @@ void EndVideoDec( vlc_object_t *obj )
     if( p_sys->p_va )
         vlc_va_Delete( p_sys->p_va );
 
-    vlc_mutex_destroy( &p_sys->lock );
     free( p_sys );
 }
 
index f129ab9..aef0710 100644 (file)
@@ -275,7 +275,6 @@ found:
 error:
     vlc_cond_destroy( &p_sys->wait_input );
     vlc_cond_destroy( &p_sys->wait_output );
-    vlc_mutex_destroy( &p_sys->lock );
     free( p_sys );
     return VLC_ENOMEM;
 }
@@ -296,7 +295,6 @@ static void DecoderClose( vlc_object_t *p_this )
     vlc_join( p_sys->thread, NULL );
     vlc_cond_destroy( &p_sys->wait_input );
     vlc_cond_destroy( &p_sys->wait_output );
-    vlc_mutex_destroy( &p_sys->lock );
     free( p_sys );
 }
 
index 77b6b5b..531b812 100644 (file)
@@ -1308,7 +1308,6 @@ static void DecSysRelease( decoder_sys_t *p_sys )
     }
 
     vlc_mutex_unlock( &p_sys->lock );
-    vlc_mutex_destroy( &p_sys->lock );
 
 #ifdef HAVE_TIGER
     if( p_sys->p_tr )
index aff12c9..dbaa5f5 100644 (file)
@@ -303,7 +303,6 @@ static void DecSysRelease( decoder_sys_t *p_sys )
         return;
     }
     vlc_mutex_unlock( &p_sys->lock );
-    vlc_mutex_destroy( &p_sys->lock );
 
     if( p_sys->p_track )
         ass_free_track( p_sys->p_track );
index be92640..ec2536d 100644 (file)
@@ -1004,7 +1004,6 @@ static void AbortDecoderLocked(decoder_t *p_dec)
 
 static void CleanDecoder(decoder_sys_t *p_sys)
 {
-    vlc_mutex_destroy(&p_sys->lock);
     vlc_cond_destroy(&p_sys->cond);
     vlc_cond_destroy(&p_sys->dec_cond);
 
index c08f280..6617534 100644 (file)
@@ -88,8 +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_mutex_destroy( &(p_fifo)->lock ); \
-         vlc_cond_destroy (&(p_fifo)->wait); } while(0)
+    do { vlc_cond_destroy (&(p_fifo)->wait); } while(0)
 
 #define OMX_FIFO_PEEK(p_fifo, p_buffer) \
          p_buffer = (p_fifo)->p_first;
index ee30252..ba3de5c 100644 (file)
@@ -50,7 +50,6 @@ void InitOmxEventQueue(OmxEventQueue *queue)
 
 void DeinitOmxEventQueue(OmxEventQueue *queue)
 {
-    vlc_mutex_destroy(&queue->mutex);
     vlc_cond_destroy(&queue->cond);
 }
 
index edf39a8..5e1bc09 100644 (file)
@@ -1304,7 +1304,6 @@ static void pic_pacer_Destroy(void *priv)
 {
     struct pic_pacer *pic_pacer = priv;
 
-    vlc_mutex_destroy(&pic_pacer->lock);
     vlc_cond_destroy(&pic_pacer->wait);
 }
 
@@ -1495,8 +1494,6 @@ static void CloseDecoder(vlc_object_t *p_this)
     if(p_sys->pf_codec_clean)
         p_sys->pf_codec_clean(p_dec);
 
-    vlc_mutex_destroy(&p_sys->lock);
-
     vlc_video_context_Release(p_sys->vctx);
 
     free(p_sys);
index 2670df9..262bb92 100644 (file)
@@ -288,8 +288,6 @@ static void Close( vlc_object_t *p_this )
     var_DelCallback( p_dec, "vbi-opaque", Opaque, p_sys );
     var_DelCallback( p_dec, "vbi-page", RequestPage, p_sys );
 
-    vlc_mutex_destroy( &p_sys->lock );
-
     if( p_sys->p_vbi_dec )
         vbi_decoder_delete( p_sys->p_vbi_dec );
     free( p_sys );
index ed386bd..dfe3afb 100644 (file)
@@ -346,8 +346,6 @@ playlist_listener_failure:
     dbus_connection_unref( p_conn );
 
 dbus_connection_failure:
-    vlc_mutex_destroy( &p_sys->lock );
-
     vlc_close( p_sys->p_pipe_fds[1] );
     vlc_close( p_sys->p_pipe_fds[0] );
 
@@ -387,7 +385,6 @@ static void Close   ( vlc_object_t *p_this )
         callback_info_t* info = vlc_array_item_at_index( &p_sys->events, i );
         free( info );
     }
-    vlc_mutex_destroy( &p_sys->lock );
     vlc_array_clear( &p_sys->events );
     vlc_array_clear( &p_sys->timeouts );
     vlc_array_clear( &p_sys->watches );
index 668be69..4497a44 100644 (file)
@@ -161,7 +161,6 @@ static int Open ( vlc_object_t *p_this )
 
 error:
     vlc_vector_clear(&p_sys->vout_vector);
-    vlc_mutex_destroy( &p_sys->lock );
     free(p_sys);
     return VLC_EGENERIC;
 }
@@ -198,7 +197,6 @@ static void Close ( vlc_object_t *p_this )
     vlc_vector_clear(&p_sys->vout_vector);
 
     /* Destroy structure */
-    vlc_mutex_destroy( &p_sys->lock );
     free( p_sys );
 }
 
index 2a0e3a2..39c34f2 100644 (file)
@@ -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_mutex_destroy( &p_sys->lock );
         vlc_cond_destroy( &p_sys->wait );
         free( p_sys );
         p_intf->p_sys = NULL;
@@ -94,7 +93,6 @@ static int Open( vlc_object_t *p_this )
     {
         vlc_mutex_unlock( &p_sys->lock );
         vlc_join( p_sys->thread, NULL );
-        vlc_mutex_destroy( &p_sys->lock );
         vlc_cond_destroy( &p_sys->wait );
         free( p_sys );
         p_intf->p_sys = NULL;
@@ -121,7 +119,6 @@ static void Close( vlc_object_t *p_this )
     vlc_mutex_unlock( &p_sys->lock );
 
     vlc_join( p_sys->thread, NULL );
-    vlc_mutex_destroy( &p_sys->lock );
     vlc_cond_destroy( &p_sys->wait );
     free( p_sys );
 }
index cdfa70b..8f7161e 100644 (file)
@@ -1891,7 +1891,6 @@ error:
     }
     net_ListenClose( pi_socket );
     free( psz_unix_path );
-    vlc_mutex_destroy( &p_sys->status_lock );
     free( p_sys );
     return VLC_EGENERIC;
 }
@@ -1923,7 +1922,6 @@ static void Deactivate( vlc_object_t *p_this )
         free( p_sys->psz_unix_path );
     }
 #endif
-    vlc_mutex_destroy( &p_sys->status_lock );
     free( p_sys );
 }
 
index a8bce7a..c0d3c9a 100644 (file)
@@ -90,10 +90,7 @@ PlaylistManager::~PlaylistManager   ()
     delete logic;
     delete resources;
     vlc_cond_destroy(&waitcond);
-    vlc_mutex_destroy(&lock);
-    vlc_mutex_destroy(&demux.lock);
     vlc_cond_destroy(&demux.cond);
-    vlc_mutex_destroy(&cached.lock);
 }
 
 void PlaylistManager::unsetPeriod()
index c4119da..12c0a31 100644 (file)
@@ -119,8 +119,6 @@ AbstractStream::~AbstractStream()
     delete demuxer;
     delete demuxersource;
     delete fakeesout;
-
-    vlc_mutex_destroy(&lock);
 }
 
 void AbstractStream::prepareRestart(bool b_discontinuity)
index bd34f3c..95613b1 100644 (file)
@@ -39,7 +39,6 @@ Keyring::Keyring(vlc_object_t *obj_)
 
 Keyring::~Keyring()
 {
-    vlc_mutex_destroy(&lock);
 }
 
 KeyringKey Keyring::getKey(SharedResources *resources, const std::string &uri)
index 3ec89fd..384c640 100644 (file)
@@ -157,7 +157,6 @@ HTTPChunkSource::~HTTPChunkSource()
 {
     if(connection)
         connection->setUsed(false);
-    vlc_mutex_destroy(&lock);
 }
 
 bool HTTPChunkSource::init(const std::string &url)
index 7d0ec6e..f2f96c4 100644 (file)
@@ -58,7 +58,6 @@ Downloader::~Downloader()
 
     if(thread_handle_valid)
         vlc_join(thread_handle, NULL);
-    vlc_mutex_destroy(&lock);
     vlc_cond_destroy(&waitcond);
 }
 void Downloader::schedule(HTTPChunkBufferedSource *source)
index 96967af..d1c5e55 100644 (file)
@@ -74,7 +74,6 @@ HTTPConnectionManager::~HTTPConnectionManager   ()
     delete downloader;
     delete factory;
     this->closeAllConnections();
-    vlc_mutex_destroy(&lock);
 }
 
 void HTTPConnectionManager::closeAllConnections      ()
index ff4f7a7..9afdead 100644 (file)
@@ -60,7 +60,6 @@ NearOptimalAdaptationLogic::NearOptimalAdaptationLogic(vlc_object_t *obj)
 
 NearOptimalAdaptationLogic::~NearOptimalAdaptationLogic()
 {
-    vlc_mutex_destroy(&lock);
 }
 
 BaseRepresentation *
index c81b40b..81f171f 100644 (file)
@@ -63,7 +63,6 @@ PredictiveAdaptationLogic::PredictiveAdaptationLogic(vlc_object_t *obj)
 
 PredictiveAdaptationLogic::~PredictiveAdaptationLogic()
 {
-    vlc_mutex_destroy(&lock);
 }
 
 BaseRepresentation *PredictiveAdaptationLogic::getNextRepresentation(BaseAdaptationSet *adaptSet, BaseRepresentation *prevRep)
index bb7b6e9..2885110 100644 (file)
@@ -49,7 +49,6 @@ RateBasedAdaptationLogic::RateBasedAdaptationLogic  (vlc_object_t *obj) :
 
 RateBasedAdaptationLogic::~RateBasedAdaptationLogic()
 {
-    vlc_mutex_destroy(&lock);
 }
 
 BaseRepresentation *RateBasedAdaptationLogic::getNextRepresentation(BaseAdaptationSet *adaptSet, BaseRepresentation *currep)
index 052191d..fec642e 100644 (file)
@@ -165,7 +165,6 @@ FakeESOut::~FakeESOut()
     gc();
 
     delete commandsqueue;
-    vlc_mutex_destroy(&lock);
 }
 
 void FakeESOut::resetTimestamps()
index 6fde3aa..99f1cd6 100644 (file)
@@ -45,8 +45,6 @@ demux_sys_t::~demux_sys_t()
 
     while( titles.size() )
     { vlc_input_title_Delete( titles.back() ); titles.pop_back();}
-
-    vlc_mutex_destroy( &lock_demuxer );
 }
 
 
index 93cf963..0a6d700 100644 (file)
@@ -43,7 +43,6 @@ event_thread_t::~event_thread_t()
 {
     ResetPci();
     vlc_cond_destroy( &wait );
-    vlc_mutex_destroy( &lock );
 }
 
 void event_thread_t::SetPci(const pci_t *data)
index d170127..3bd6d0e 100644 (file)
@@ -417,14 +417,12 @@ static int Open( vlc_object_t *p_this )
     patpid = GetPID(p_sys, 0);
     if ( !PIDSetup( p_demux, TYPE_PAT, patpid, NULL ) )
     {
-        vlc_mutex_destroy( &p_sys->csa_lock );
         free( p_sys );
         return VLC_ENOMEM;
     }
     if( !ts_psi_PAT_Attach( patpid, p_demux ) )
     {
         PIDRelease( p_demux, patpid );
-        vlc_mutex_destroy( &p_sys->csa_lock );
         free( p_sys );
         return VLC_EGENERIC;
     }
@@ -586,8 +584,6 @@ static void Close( vlc_object_t *p_this )
         vlc_stream_Delete( p_sys->arib.b25stream );
     }
 
-    vlc_mutex_destroy( &p_sys->csa_lock );
-
     /* Release all non default pids */
     ts_pid_list_Release( p_demux, &p_sys->pids );
 
index 8e31560..e91ac59 100644 (file)
@@ -1760,7 +1760,6 @@ static void Close(vlc_object_t *p_this)
     endwin();   /* Close the ncurses interface */
 
     vlc_LogSet(vlc_object_instance(p_this), NULL, NULL);
-    vlc_mutex_destroy(&sys->msg_lock);
     for(unsigned i = 0; i < sizeof sys->msgs / sizeof *sys->msgs; i++) {
         if (sys->msgs[i].item)
             msg_Free(sys->msgs[i].item);
index faec9d2..3ba327f 100644 (file)
@@ -44,7 +44,6 @@ MLBaseModel::MLBaseModel(QObject *parent)
 
 MLBaseModel::~MLBaseModel()
 {
-    vlc_mutex_destroy( &m_item_lock );
 }
 
 void MLBaseModel::sortByColumn(QByteArray name, Qt::SortOrder order)
index bf601b9..fab0741 100644 (file)
@@ -45,7 +45,6 @@ AsyncQueue::AsyncQueue( intf_thread_t *pIntf ): SkinObject( pIntf ),
 AsyncQueue::~AsyncQueue()
 {
     delete( m_pTimer );
-    vlc_mutex_destroy( &m_lock );
 }
 
 
index f9c8d96..79fb556 100644 (file)
@@ -71,7 +71,6 @@ public:
     virtual ~CmdExecuteBlock()
     {
         vlc_cond_destroy( &m_wait );
-        vlc_mutex_destroy( &m_lock );
     }
 
     static void executeWait( const CmdGenericPtr& rcCommand  )
index 9762ad3..6534d30 100644 (file)
@@ -830,7 +830,6 @@ void D3D11CloseConverter( vlc_object_t *obj )
     D3D11_ReleaseProcessor( &p_sys->d3d_proc );
 #endif
     CopyCleanCache(&p_sys->cache);
-    vlc_mutex_destroy(&p_sys->staging_lock);
     if (p_sys->staging)
         ID3D11Texture2D_Release(p_sys->staging);
 }
index e334853..a10ac56 100644 (file)
@@ -586,8 +586,6 @@ static void CloseDecoder(vlc_object_t *p_this)
 
     hw_mmal_port_pool_ref_release(sys->ppr, false);
 
-    vlc_mutex_destroy(&sys->pic_lock);
-
     if (sys->vctx)
         vlc_video_context_Release(sys->vctx);
 
index 1d161c7..f49f1f0 100644 (file)
@@ -782,8 +782,6 @@ void CloseConverter(vlc_object_t * obj)
     if (sys->dec_dev)
         vlc_decoder_device_Release(sys->dec_dev);
 
-    vlc_mutex_destroy(&sys->lock);
-
     p_filter->p_sys = NULL;
     free(sys);
 }
index 600dc01..70567db 100644 (file)
@@ -98,7 +98,6 @@ static void cma_pool_fixed_delete(cma_pool_fixed_t * const p)
     free(p->name);
 
     vlc_cond_destroy(&p->flight_cond);
-    vlc_mutex_destroy(&p->lock);
     free(p);
 
     // Inform our container that we are dead (if it cares)
index 6f6a072..915ee06 100644 (file)
@@ -1201,8 +1201,6 @@ static void hw_mmal_vzc_pool_delete(vzc_pool_ctl_t * const pc)
     if (pc->buf_pool != NULL)
         mmal_pool_destroy(pc->buf_pool);
 
-    vlc_mutex_destroy(&pc->lock);
-
 //    memset(pc, 0xba, sizeof(*pc)); // Zap for (hopefully) faster crash
     free (pc);
 }
index 9204626..ee48a6a 100644 (file)
@@ -1071,8 +1071,6 @@ static void CloseMmalVout(vout_display_t * vd)
 
     hw_mmal_vzc_pool_release(sys->vzc);
 
-    vlc_mutex_destroy(&sys->manage_mutex);
-
     if (sys->native_interlaced) {
         if (vc_gencmd(response, sizeof(response), "hvs_update_fields 0") < 0 ||
                 response[18] != '0')
index 527433d..7981bc7 100644 (file)
@@ -147,7 +147,6 @@ Close(vlc_object_t *p_this)
     vlc_keystore_sys *p_sys = p_keystore->p_sys;
 
     ks_list_free(&p_sys->list);
-    vlc_mutex_destroy(&p_keystore->p_sys->lock);
     free(p_sys);
 }
 
index 5ff93d1..b4ea69d 100644 (file)
@@ -176,8 +176,6 @@ void Close_Extension( vlc_object_t *p_this )
         free( p_ext->psz_version );
         free( p_ext->p_icondata );
 
-        vlc_mutex_destroy( &p_ext->p_sys->running_lock );
-        vlc_mutex_destroy( &p_ext->p_sys->command_lock );
         vlc_cond_destroy( &p_ext->p_sys->wait );
         vlc_timer_destroy( p_ext->p_sys->timer );
 
@@ -185,8 +183,6 @@ void Close_Extension( vlc_object_t *p_this )
         free( p_ext );
     }
 
-    vlc_mutex_destroy( &p_mgr->lock );
-
     ARRAY_RESET( p_mgr->extensions );
 }
 
@@ -488,8 +484,6 @@ exit:
         free( p_ext->psz_description );
         free( p_ext->psz_shortdescription );
         free( p_ext->psz_version );
-        vlc_mutex_destroy( &p_ext->p_sys->command_lock );
-        vlc_mutex_destroy( &p_ext->p_sys->running_lock );
         vlc_cond_destroy( &p_ext->p_sys->wait );
         free( p_ext->p_sys );
         free( p_ext );
index 927a0a4..8af0409 100644 (file)
@@ -287,7 +287,6 @@ static int vlclua_dialog_delete( lua_State *L )
     ARRAY_RESET( p_dlg->widgets );
 
     /* Note: At this point, the UI must not use these resources */
-    vlc_mutex_destroy( &p_dlg->lock );
     vlc_cond_destroy( &p_dlg->cond );
     free( p_dlg );
 
index 2bbffe2..8b5aebd 100644 (file)
@@ -240,7 +240,6 @@ int Open_LuaSD( vlc_object_t *p_this )
     {
         TAB_CLEAN( p_sys->i_query, p_sys->ppsz_query );
         vlc_cond_destroy( &p_sys->cond );
-        vlc_mutex_destroy( &p_sys->lock );
         goto error;
     }
     return VLC_SUCCESS;
@@ -269,7 +268,6 @@ void Close_LuaSD( vlc_object_t *p_this )
     TAB_CLEAN( p_sys->i_query, p_sys->ppsz_query );
 
     vlc_cond_destroy( &p_sys->cond );
-    vlc_mutex_destroy( &p_sys->lock );
     free( p_sys->psz_filename );
     lua_close( p_sys->L );
     free( p_sys );
index f6d3887..ce3ca41 100644 (file)
@@ -422,7 +422,6 @@ fail:
         if (p_sys->player_listener)
         {
             vlc_cond_destroy(&p_sys->wait);
-            vlc_mutex_destroy(&p_sys->lock);
             vlc_player_RemoveListener(player, p_sys->player_listener);
         }
         vlc_playlist_RemoveListener(playlist, p_sys->playlist_listener);
@@ -452,7 +451,6 @@ static void Close(vlc_object_t *p_this)
     vlc_UrlClean(&p_sys->p_nowp_url);
 
     vlc_cond_destroy(&p_sys->wait);
-    vlc_mutex_destroy(&p_sys->lock);
 
     vlc_playlist_Lock(playlist);
     vlc_player_RemoveListener(
index 0481afb..ebf2814 100644 (file)
@@ -298,7 +298,6 @@ static void CleanSys( fingerprinter_sys_t *p_sys )
     for ( size_t i = 0; i < vlc_array_count( &p_sys->incoming.queue ); i++ )
         fingerprint_request_Delete( vlc_array_item_at_index( &p_sys->incoming.queue, i ) );
     vlc_array_clear( &p_sys->incoming.queue );
-    vlc_mutex_destroy( &p_sys->incoming.lock );
 
     for ( size_t i = 0; i < vlc_array_count( &p_sys->processing.queue ); i++ )
         fingerprint_request_Delete( vlc_array_item_at_index( &p_sys->processing.queue, i ) );
@@ -308,7 +307,6 @@ static void CleanSys( fingerprinter_sys_t *p_sys )
     for ( size_t i = 0; i < vlc_array_count( &p_sys->results.queue ); i++ )
         fingerprint_request_Delete( vlc_array_item_at_index( &p_sys->results.queue, i ) );
     vlc_array_clear( &p_sys->results.queue );
-    vlc_mutex_destroy( &p_sys->results.lock );
 
     vlc_player_Lock(p_sys->player);
     vlc_player_RemoveListener(p_sys->player, p_sys->listener_id);
index d90f754..9b4a900 100644 (file)
@@ -462,8 +462,6 @@ static void MediaDel( vod_t *p_vod, vod_media_t *p_media )
         MediaDelES( p_vod, p_media, &p_media->es[0]->fmt );
     TAB_CLEAN( p_media->i_es, p_media->es );
 
-    vlc_mutex_destroy( &p_media->lock );
-
     free( p_media );
 }
 
index fe24951..3b14f03 100644 (file)
@@ -619,8 +619,6 @@ static int st_SessionShutdown (vlc_tls_t *session, bool duplex) {
 
     msg_Dbg(sys->obj, "shutdown TLS session");
 
-    vlc_mutex_destroy(&sys->lock);
-
     OSStatus ret = noErr;
     VLC_UNUSED(duplex);
 
index dc94d12..0420742 100644 (file)
@@ -769,7 +769,6 @@ static void Close( vlc_object_t * p_this )
         var_DelCallback( p_mux, SOUT_CFG_PREFIX "csa2-ck", ChangeKeyCallback, NULL );
         var_DelCallback( p_mux, SOUT_CFG_PREFIX "csa-use", ActiveKeyCallback, NULL );
         csa_Delete( p_sys->csa );
-        vlc_mutex_destroy( &p_sys->csa_lock );
     }
 
     for (int i = 0; i < MAX_SDT_DESC; i++ )
index 4f6a7e9..64017cc 100644 (file)
@@ -170,7 +170,6 @@ static void Close( vlc_object_t *p_this )
         g_object_unref( p_sys->notification );
     }
 
-    vlc_mutex_destroy( &p_sys->lock );
     free( p_sys );
     notify_uninit();
 }
index a29996d..e89a757 100644 (file)
@@ -151,7 +151,6 @@ static int Open( vlc_object_t *p_this )
         var_DelCallback( pl, "podcast-request", Request, p_sys );
         var_DelCallback( pl, "podcast-urls", UrlsChange, p_sys );
         vlc_cond_destroy( &p_sys->wait );
-        vlc_mutex_destroy( &p_sys->lock );
         free (p_sys);
         return VLC_EGENERIC;
     }
@@ -173,7 +172,6 @@ static void Close( vlc_object_t *p_this )
     var_DelCallback( pl, "podcast-urls", UrlsChange, p_sys );
     var_DelCallback( pl, "podcast-request", Request, p_sys );
     vlc_cond_destroy( &p_sys->wait );
-    vlc_mutex_destroy( &p_sys->lock );
 
     for( int i = 0; i < p_sys->i_urls; i++ )
          free( p_sys->ppsz_urls[i] );
index 06d84d5..de3f962 100644 (file)
@@ -602,8 +602,6 @@ static void Close(vlc_object_t *p_this)
     if (p_sys->p_blend)
         filter_DeleteBlend(p_sys->p_blend);
 
-    vlc_mutex_destroy(&p_sys->lock);
-
     if (p_sys->p_BarGraph.p_pic)
         picture_Release(p_sys->p_BarGraph.p_pic);
 
index 0eae0f0..b038a2d 100644 (file)
@@ -148,7 +148,6 @@ static void Destroy( vlc_object_t *p_this )
     var_DelCallback( p_filter, "overlay-input", AdjustCallback, p_sys );
     var_DelCallback( p_filter, "overlay-output", AdjustCallback, p_sys );
 
-    vlc_mutex_destroy( &p_sys->lock );
     free( p_sys->psz_inputfile );
     free( p_sys->psz_outputfile );
     free( p_sys );
index f72c841..fa1ee03 100644 (file)
@@ -321,7 +321,6 @@ static void Close( vlc_object_t *p_this )
     if( p_sys->p_blend )
         filter_DeleteBlend( p_sys->p_blend );
 
-    vlc_mutex_destroy( &p_sys->lock );
     LogoListUnload( &p_sys->list );
     free( p_sys );
 }
index 44060a1..c370c53 100644 (file)
@@ -255,7 +255,6 @@ static void DestroyFilter( vlc_object_t *p_this )
     DEL_VAR( "marq-color" );
     DEL_VAR( "marq-size" );
 
-    vlc_mutex_destroy( &p_sys->lock );
     text_style_Delete( p_sys->p_style );
     free( p_sys->format );
     free( p_sys->filepath );
index e4a876f..b06ca3f 100644 (file)
@@ -421,7 +421,6 @@ static void DestroyFilter( vlc_object_t *p_this )
         p_sys->i_offsets_length = 0;
     }
 
-    vlc_mutex_destroy( &p_sys->lock );
     free( p_sys );
 }
 
index 2569da0..67d3cab 100644 (file)
@@ -308,10 +308,7 @@ static int CreateFilter( vlc_object_t *p_this )
 
     /* Create and arm the timer */
     if( vlc_timer_create( &p_sys->timer, Fetch, p_filter ) )
-    {
-        vlc_mutex_destroy( &p_sys->lock );
         goto error;
-    }
     vlc_timer_schedule_asap( p_sys->timer, vlc_tick_from_sec(i_ttl) );
 
     free( psz_urls );
@@ -334,7 +331,6 @@ static void DestroyFilter( vlc_object_t *p_this )
     filter_sys_t *p_sys = p_filter->p_sys;
 
     vlc_timer_destroy( p_sys->timer );
-    vlc_mutex_destroy( &p_sys->lock );
 
     text_style_Delete( p_sys->p_style );
     free( p_sys->psz_marquee );
index 8b961e7..70b2e9a 100644 (file)
@@ -518,8 +518,6 @@ static void SubsdelayHeapDestroy( subsdelay_heap_t *p_heap )
     }
 
     SubsdelayHeapUnlock( p_heap );
-
-    vlc_mutex_destroy( &p_heap->lock );
 }
 
 /*****************************************************************************
index f5fdd94..9b76980 100644 (file)
@@ -328,7 +328,6 @@ static int Open (stream_t *stream, const char *path)
     {
         if (p_sys->pid != -1)
             while (waitpid (p_sys->pid, &(int){ 0 }, 0) == -1);
-        vlc_mutex_destroy (&p_sys->lock);
         vlc_cond_destroy (&p_sys->wait);
         free (p_sys);
         return ret;
@@ -361,7 +360,6 @@ static void Close (vlc_object_t *obj)
     while (waitpid (p_sys->pid, &status, 0) == -1);
     msg_Dbg (obj, "exit status %d", status);
 
-    vlc_mutex_destroy (&p_sys->lock);
     vlc_cond_destroy (&p_sys->wait);
     free (p_sys);
 }
index 1b2290e..88d1e76 100644 (file)
@@ -1222,9 +1222,7 @@ static void cleanup_Manifest( manifest_t *m )
 
 static void cleanup_threading( hds_stream_t *stream )
 {
-    vlc_mutex_destroy( &stream->dl_lock );
     vlc_cond_destroy( &stream->dl_cond );
-    vlc_mutex_destroy( &stream->abst_lock );
 }
 
 static void write_int_24( uint8_t *p, uint32_t val )
index 2f610c6..01b7e2c 100644 (file)
@@ -496,7 +496,6 @@ static int Open(vlc_object_t *obj)
     {
         vlc_cond_destroy(&sys->wait_space);
         vlc_cond_destroy(&sys->wait_data);
-        vlc_mutex_destroy(&sys->lock);
         vlc_interrupt_destroy(sys->interrupt);
         goto error;
     }
@@ -529,7 +528,6 @@ static void Close (vlc_object_t *obj)
     vlc_interrupt_destroy(sys->interrupt);
     vlc_cond_destroy(&sys->wait_space);
     vlc_cond_destroy(&sys->wait_data);
-    vlc_mutex_destroy(&sys->lock);
 
     while(sys->controls)
     {
index 9f909a9..97b6368 100644 (file)
@@ -113,7 +113,6 @@ struct sout_stream_sys_t
 
     ~sout_stream_sys_t()
     {
-        vlc_mutex_destroy(&lock);
     }
 
     bool canDecodeVideo( vlc_fourcc_t i_codec ) const;
index 3c23633..b0d6404 100644 (file)
@@ -553,9 +553,6 @@ static int Open( vlc_object_t *p_this )
         {
             msg_Err( p_stream, "unsupported muxer type for RTP (only TS/PS)" );
             free( psz );
-            vlc_mutex_destroy( &p_sys->lock_sdp );
-            vlc_mutex_destroy( &p_sys->lock_ts );
-            vlc_mutex_destroy( &p_sys->lock_es );
             free( p_sys->psz_vod_session );
             free( p_sys->psz_destination );
             free( p_sys );
@@ -570,9 +567,6 @@ static int Open( vlc_object_t *p_this )
         {
             msg_Err( p_stream, "cannot create muxer" );
             sout_AccessOutDelete( p_sys->p_grab );
-            vlc_mutex_destroy( &p_sys->lock_sdp );
-            vlc_mutex_destroy( &p_sys->lock_ts );
-            vlc_mutex_destroy( &p_sys->lock_es );
             free( p_sys->psz_vod_session );
             free( p_sys->psz_destination );
             free( p_sys );
@@ -662,10 +656,6 @@ static void Close( vlc_object_t * p_this )
     if( p_sys->rtsp != NULL )
         RtspUnsetup( p_sys->rtsp );
 
-    vlc_mutex_destroy( &p_sys->lock_sdp );
-    vlc_mutex_destroy( &p_sys->lock_ts );
-    vlc_mutex_destroy( &p_sys->lock_es );
-
     if( p_sys->p_httpd_file )
         httpd_FileDelete( p_sys->p_httpd_file );
 
@@ -1251,8 +1241,6 @@ static void Del( sout_stream_t *p_stream, void *_id )
         srtp_destroy( id->srtp );
 #endif
 
-    vlc_mutex_destroy( &id->lock_sink );
-
     /* Update SDP (sap/file) */
     if( p_sys->b_export_sap ) SapSetup( p_stream );
     if( p_sys->psz_sdp_file != NULL ) FileSetup( p_stream );
index 6161f6a..d62cceb 100644 (file)
@@ -151,8 +151,6 @@ void RtspUnsetup( rtsp_stream_t *rtsp )
         vlc_timer_destroy(rtsp->timer);
 
     free( rtsp->psz_path );
-    vlc_mutex_destroy( &rtsp->lock );
-
     free( rtsp );
 }
 
index 19de328..9c56b8f 100644 (file)
@@ -92,7 +92,6 @@ DBMSDIOutput::~DBMSDIOutput()
         p_card->Release();
 
     vlc_cond_destroy(&feeder.cond);
-    vlc_mutex_destroy(&feeder.lock);
 }
 
 AbstractStream *DBMSDIOutput::Add(const es_format_t *fmt)
index a196860..0e728c3 100644 (file)
@@ -237,7 +237,6 @@ AbstractDecodedStream::~AbstractDecodedStream()
     deinit();
     es_format_Clean(&requestedoutput);
     vlc_cond_destroy(&inputWait);
-    vlc_mutex_destroy(&inputLock);
 }
 
 void AbstractDecodedStream::deinit()
index e8ffb34..2c89332 100644 (file)
@@ -50,7 +50,6 @@ void transcode_encoder_delete( transcode_encoder_t *p_enc )
         {
             block_ChainRelease( p_enc->p_buffers );
             picture_fifo_Delete( p_enc->pp_pics );
-            vlc_mutex_destroy( &p_enc->lock_out );
         }
         es_format_Clean( &p_enc->p_encoder->fmt_in );
         es_format_Clean( &p_enc->p_encoder->fmt_out );
index c0303d1..fc84204 100644 (file)
@@ -494,18 +494,12 @@ static void Close( vlc_object_t * p_this )
 
     transcode_encoder_config_clean( &p_sys->senc_cfg );
 
-    vlc_mutex_destroy( &p_sys->lock );
-
     free( p_sys );
 }
 
 static void DeleteSoutStreamID( sout_stream_id_sys_t *id )
 {
-    if( id )
-    {
-        vlc_mutex_destroy(&id->fifo.lock);
-        free( id );
-    }
+    free( id );
 }
 
 static void SendSpuToVideoCallback( void *cbdata, subpicture_t *p_subpicture )
index 7268496..001f371 100644 (file)
@@ -135,7 +135,6 @@ static void Destroy( vlc_object_t *p_this )
     var_DelCallback( p_filter, CFG_PREFIX "mask", MaskCallback,
                      p_filter );
 
-    vlc_mutex_destroy( &p_sys->mask_lock );
     if( p_sys->p_mask )
         picture_Release( p_sys->p_mask );
 
index d4d8c26..563ff8b 100644 (file)
@@ -332,8 +332,6 @@ static void Destroy( vlc_object_t *p_this )
     var_DelCallback( p_filter, FILTER_PREFIX "edge-visible",
                      ballCallback, p_sys );
 
-    vlc_mutex_destroy( &p_sys->lock );
-
     image_HandlerDelete( p_sys->p_image );
 
     free( p_sys->p_smooth );
index 730af68..3fe83a1 100644 (file)
@@ -159,7 +159,6 @@ static void Destroy( vlc_object_t *p_this )
     var_DelCallback( p_filter, CFG_PREFIX "vt", BluescreenCallback, p_sys );
 
     free( p_sys->p_at );
-    vlc_mutex_destroy( &p_sys->lock );
     free( p_sys );
 }
 
index 91a6b7b..7e6683b 100644 (file)
@@ -196,7 +196,6 @@ static void Destroy( vlc_object_t *p_this )
     var_DelCallback( p_filter, CFG_PREFIX "x", EraseCallback, p_sys );
     var_DelCallback( p_filter, CFG_PREFIX "y", EraseCallback, p_sys );
     var_DelCallback( p_filter, CFG_PREFIX "mask", EraseCallback, p_sys );
-    vlc_mutex_destroy( &p_sys->lock );
 
     free( p_filter->p_sys );
 }
index 9de5f80..0e84964 100644 (file)
@@ -157,7 +157,6 @@ static void Destroy( vlc_object_t *p_this )
 
     var_DelCallback( p_filter, FILTER_PREFIX "component", ExtractCallback,
                      p_sys );
-    vlc_mutex_destroy( &p_sys->lock );
     free( p_sys->projection_matrix );
     free( p_sys );
 }
index b178084..093d207 100644 (file)
@@ -169,7 +169,6 @@ static void Close(vlc_object_t *object)
     var_DelCallback(filter, CFG_PREFIX "radius",   Callback, NULL);
     var_DelCallback(filter, CFG_PREFIX "strength", Callback, NULL);
     aligned_free(sys->cfg.buf);
-    vlc_mutex_destroy(&sys->lock);
     free(sys);
 }
 
index 671334e..2267530 100644 (file)
@@ -223,7 +223,6 @@ static void Destroy( vlc_object_t *p_this )
                      GradientCallback, p_sys );
     var_DelCallback( p_filter, FILTER_PREFIX "cartoon",
                      GradientCallback, p_sys );
-    vlc_mutex_destroy( &p_sys->lock );
 
     free( p_sys->p_buf32 );
     free( p_sys->p_buf32_bis );
index 34cb4ce..174de0a 100644 (file)
@@ -430,7 +430,6 @@ static void Close(vlc_object_t *object)
     filter_sys_t *sys    = filter->p_sys;
 
     var_DelCallback(filter, CFG_PREFIX "variance", Callback, NULL);
-    vlc_mutex_destroy(&sys->cfg.lock);
     free(sys);
 }
 
index bd45375..beb5797 100644 (file)
@@ -179,8 +179,6 @@ static void Close(vlc_object_t *this)
     var_DelCallback( filter, FILTER_PREFIX "luma-temp", DenoiseCallback, sys );
     var_DelCallback( filter, FILTER_PREFIX "chroma-temp", DenoiseCallback, sys );
 
-    vlc_mutex_destroy( &sys->coefs_mutex );
-
     for (int i = 0; i < 3; ++i) {
         free(cfg->Frame[i]);
     }
index e3fd252..bf0192d 100644 (file)
@@ -272,7 +272,6 @@ static void ClosePostproc( vlc_object_t *p_this )
     var_DelCallback( p_filter, FILTER_PREFIX "name", PPNameCallback, NULL );
 
     /* Destroy the resources */
-    vlc_mutex_destroy( &p_sys->lock );
     pp_free_context( p_sys->pp_context );
     pp_free_mode( p_sys->pp_mode );
     free( p_sys );
index f85f6a1..35e0a09 100644 (file)
@@ -226,9 +226,6 @@ static void Close( vlc_object_t *p_this ) {
     var_DelCallback( p_filter, CFG_PREFIX "rotation",      puzzle_Callback, p_sys );
     var_DelCallback( p_filter, CFG_PREFIX "mode",          puzzle_Callback, p_sys );
 
-    vlc_mutex_destroy( &p_sys->lock );
-    vlc_mutex_destroy( &p_sys->pce_lock );
-
     /* Free allocated memory */
     puzzle_free_ps_puzzle_array ( p_filter );
     puzzle_free_ps_pieces_shapes ( p_filter);
index c166233..3c7c85e 100644 (file)
@@ -351,7 +351,6 @@ static void ReleaseDLSys(vlc_object_t *obj, int i_cat)
 
     if (--sys->users == 0) {
         msg_Dbg(obj, "Destroying decklink data");
-        vlc_mutex_destroy(&sys->lock);
         vlc_cond_destroy(&sys->cond);
 
         if (sys->p_output) {
index 9a07519..5c273de 100644 (file)
@@ -507,7 +507,6 @@ static void GLESSwap(vlc_gl_t *gl)
 
 - (void)dealloc
 {
-    vlc_mutex_destroy(&_mutex);
     vlc_cond_destroy(&_gl_attached_wait);
     [super dealloc];
 }
index 43cccba..71ceda4 100644 (file)
@@ -131,7 +131,6 @@ static void vlc_vidsplit_Close(vout_display_t *vd)
 
     module_unneed(&sys->splitter, sys->splitter.p_module);
     video_format_Clean(&sys->splitter.fmt);
-    vlc_mutex_destroy(&sys->lock);
     vlc_object_delete(&sys->splitter);
 }
 
@@ -249,7 +248,6 @@ static int vlc_vidsplit_Open(vout_display_t *vd,
     free(name);
     if (splitter->p_module == NULL) {
         video_format_Clean(&splitter->fmt);
-        vlc_mutex_destroy(&sys->lock);
         vlc_object_delete(splitter);
         return VLC_EGENERIC;
     }
index f6363c6..765ffb2 100644 (file)
@@ -752,7 +752,6 @@ static void Close(vout_window_t *wnd)
     vlc_cancel(sys->thread);
     vlc_join(sys->thread, NULL);
 
-    vlc_mutex_destroy(&sys->lock);
     seat_destroy_all(&sys->seats);
     output_list_destroy(sys->outputs);
 #ifdef XDG_SHELL
index 9e8df25..15da61d 100644 (file)
@@ -167,7 +167,6 @@ event_thread_t *EventThreadCreate( vlc_object_t *obj, vout_window_t *parent_wind
 void EventThreadDestroy( event_thread_t *p_event )
 {
     vlc_cond_destroy( &p_event->wait );
-    vlc_mutex_destroy( &p_event->lock );
     free( p_event );
 }
 
index 566b311..c1d3199 100644 (file)
@@ -89,7 +89,6 @@ static void CloseInhibit (vlc_object_t *obj)
     vlc_cancel(sys->thread);
     vlc_join(sys->thread, NULL);
     vlc_cond_destroy(&sys->cond);
-    vlc_mutex_destroy(&sys->mutex);
 }
 
 static int OpenInhibit (vlc_object_t *obj)
@@ -108,7 +107,6 @@ static int OpenInhibit (vlc_object_t *obj)
     if (vlc_clone(&sys->thread, Run, ih, VLC_THREAD_PRIORITY_LOW))
     {
         vlc_cond_destroy(&sys->cond);
-        vlc_mutex_destroy(&sys->mutex);
         return VLC_EGENERIC;
     }
 
index 3fa6203..a9b225f 100644 (file)
@@ -147,7 +147,6 @@ static int Open( vlc_object_t *p_this )
                    Thread, p_thread, VLC_THREAD_PRIORITY_LOW ) )
     {
         msg_Err( p_filter, "cannot launch goom thread" );
-        vlc_mutex_destroy( &p_thread->lock );
         vlc_cond_destroy( &p_thread->wait );
         vout_Close( p_thread->p_vout );
         free( p_thread );
@@ -353,7 +352,6 @@ static void Close( vlc_object_t *p_this )
 
     /* Free data */
     vout_Close( p_thread->p_vout );
-    vlc_mutex_destroy( &p_thread->lock );
     vlc_cond_destroy( &p_thread->wait );
 
     while( p_thread->i_blocks-- )
index 219dfda..f4b636f 100644 (file)
@@ -204,7 +204,6 @@ static int Open( vlc_object_t * p_this )
     return VLC_SUCCESS;
 
 error:
-    vlc_mutex_destroy( &p_sys->lock );
     free (p_sys );
     return VLC_EGENERIC;
 }
@@ -230,7 +229,6 @@ static void Close( vlc_object_t *p_this )
 
     /* Free the ressources */
     vlc_gl_surface_Destroy( p_sys->gl );
-    vlc_mutex_destroy( &p_sys->lock );
     free( p_sys->p_buffer );
     free( p_sys );
 }
index 3023917..dbbb061 100644 (file)
@@ -146,8 +146,6 @@ static int Open( vlc_object_t * p_this )
     return VLC_SUCCESS;
 
 error:
-    vlc_mutex_destroy( &p_sys->cyclic_block_mutex );
-    vlc_mutex_destroy( &p_sys->lock );
     free( p_sys );
     return VLC_EGENERIC;
 }
@@ -169,8 +167,6 @@ static void Close( vlc_object_t *p_this )
 
     /* Free the ressources */
     vlc_gl_surface_Destroy( p_sys->gl );
-    vlc_mutex_destroy( &p_sys->cyclic_block_mutex );
-    vlc_mutex_destroy( &p_sys->lock );
     delete p_sys->vsxu_cyclic_buffer;
     free( p_sys );
 }
index 24eea70..69ec70c 100644 (file)
@@ -108,7 +108,6 @@ static void clean_detached_thread(void *data)
     struct vlc_thread *th = data;
 
     /* release thread handle */
-    vlc_mutex_destroy(&th->wait.lock);
     free(th);
 }
 
index 526489e..d7d013c 100644 (file)
@@ -385,7 +385,6 @@ void aout_Release(audio_output_t *aout)
 
     atomic_thread_fence(memory_order_acquire);
 
-    vlc_mutex_destroy (&owner->dev.lock);
     for (aout_dev_t *dev = owner->dev.list, *next; dev != NULL; dev = next)
     {
         next = dev->next;
@@ -393,8 +392,6 @@ void aout_Release(audio_output_t *aout)
         free (dev);
     }
 
-    vlc_mutex_destroy (&owner->vp.lock);
-    vlc_mutex_destroy (&owner->lock);
     vlc_object_delete(VLC_OBJECT(aout));
 }
 
index 43c44be..8637d82 100644 (file)
@@ -469,7 +469,6 @@ void vlc_clock_main_ChangePause(vlc_clock_main_t *main_clock, vlc_tick_t now,
 
 void vlc_clock_main_Delete(vlc_clock_main_t *main_clock)
 {
-    vlc_mutex_destroy(&main_clock->lock);
     vlc_cond_destroy(&main_clock->cond);
     assert(main_clock->rc == 1);
     free(main_clock);
index c772462..ac891d8 100644 (file)
@@ -189,7 +189,6 @@ input_clock_t *input_clock_New( float rate )
 void input_clock_Delete( input_clock_t *cl )
 {
     AvgClean( &cl->drift );
-    vlc_mutex_destroy( &cl->lock );
     free( cl );
 }
 
index d7f8524..fd2e6aa 100644 (file)
@@ -2043,9 +2043,6 @@ static void DeleteDecoder( decoder_t * p_dec )
     vlc_cond_destroy( &p_owner->wait_fifo );
     vlc_cond_destroy( &p_owner->wait_acknowledge );
     vlc_cond_destroy( &p_owner->wait_request );
-    vlc_mutex_destroy( &p_owner->lock );
-    vlc_mutex_destroy( &p_owner->mouse_lock );
-
     decoder_Destroy( &p_owner->dec );
 }
 
index f2123fd..c8c436d 100644 (file)
@@ -124,7 +124,6 @@ vlc_demux_chained_t *vlc_demux_chained_New(vlc_object_t *parent,
     {
         vlc_stream_Delete(dc->reader);
         vlc_stream_fifo_Close(dc->writer);
-        vlc_mutex_destroy(&dc->lock);
         free(dc);
         dc = NULL;
     }
@@ -165,6 +164,5 @@ void vlc_demux_chained_Delete(vlc_demux_chained_t *dc)
 {
     vlc_stream_fifo_Close(dc->writer);
     vlc_join(dc->thread, NULL);
-    vlc_mutex_destroy(&dc->lock);
     free(dc);
 }
index 7671dc3..6955192 100644 (file)
@@ -598,8 +598,6 @@ static void EsOutDelete( es_out_t *out )
     EsOutPropsCleanup( &p_sys->audio );
     EsOutPropsCleanup( &p_sys->sub );
 
-    vlc_mutex_destroy( &p_sys->lock );
-
     free( p_sys );
 }
 
index ed79000..bfdb930 100644 (file)
@@ -405,7 +405,6 @@ static void Destroy( es_out_t *p_out )
     TAB_CLEAN( p_sys->i_es, p_sys->pp_es  );
 
     free( p_sys->psz_tmp_path );
-    vlc_mutex_destroy( &p_sys->lock );
     free( p_sys );
 }
 
@@ -784,7 +783,6 @@ static const struct es_out_callbacks es_out_timeshift_cbs =
 static void TsDestroy( ts_thread_t *p_ts )
 {
     vlc_cond_destroy( &p_ts->wait );
-    vlc_mutex_destroy( &p_ts->lock );
     free( p_ts );
 }
 static int TsStart( es_out_t *p_out )
index 2dd0bf0..bb57eb4 100644 (file)
@@ -439,7 +439,6 @@ static void Destroy(input_thread_t *input)
     }
 
     vlc_cond_destroy(&priv->wait_control);
-    vlc_mutex_destroy(&priv->lock_control);
     vlc_object_delete(VLC_OBJECT(input));
 }
 
index 1a8a2bd..1c03af7 100644 (file)
@@ -519,7 +519,6 @@ void input_item_Release( input_item_t *p_item )
         input_item_slave_Delete( p_item->pp_slaves[i] );
     TAB_CLEAN( p_item->i_slaves, p_item->pp_slaves );
 
-    vlc_mutex_destroy( &p_item->lock );
     free( owner );
 }
 
index 0d192f2..65906da 100644 (file)
@@ -299,8 +299,6 @@ void input_resource_Release( input_resource_t *p_resource )
     if( p_resource->p_aout != NULL )
         aout_Destroy( p_resource->p_aout );
 
-    vlc_mutex_destroy( &p_resource->lock_hold );
-    vlc_mutex_destroy( &p_resource->lock );
     vout_Release( p_resource->p_vout_dummy );
     free( p_resource );
 }
index 4a79ddc..b294a59 100644 (file)
@@ -72,8 +72,6 @@ struct input_stats *input_stats_Create(void)
 
 void input_stats_Destroy(struct input_stats *stats)
 {
-    vlc_mutex_destroy(&stats->demux_bitrate.lock);
-    vlc_mutex_destroy(&stats->input_bitrate.lock);
     free(stats);
 }
 
index dbf23b5..783eb28 100644 (file)
@@ -117,7 +117,6 @@ static void thumbnailer_request_Release( void* data )
         input_Close( request->input_thread );
 
     input_item_Release( request->params.input_item );
-    vlc_mutex_destroy( &request->lock );
     free( request );
 }
 
index c63217c..d33b9a9 100644 (file)
@@ -179,8 +179,6 @@ vlm_t *vlm_New( libvlc_int_t *libvlc, const char *psz_vlmconf )
     if( vlc_clone( &p_vlm->thread, Manage, p_vlm, VLC_THREAD_PRIORITY_LOW ) )
     {
         vlc_cond_destroy( &p_vlm->wait_manage );
-        vlc_mutex_destroy( &p_vlm->lock );
-        vlc_mutex_destroy( &p_vlm->lock_manage );
         vlc_object_delete(p_vlm);
         vlc_mutex_unlock( &vlm_mutex );
         return NULL;
@@ -257,8 +255,6 @@ void vlm_Delete( vlm_t *p_vlm )
     vlc_join( p_vlm->thread, NULL );
 
     vlc_cond_destroy( &p_vlm->wait_manage );
-    vlc_mutex_destroy( &p_vlm->lock );
-    vlc_mutex_destroy( &p_vlm->lock_manage );
     vlc_object_delete(p_vlm);
 }
 
index 4205d88..c761bd0 100644 (file)
@@ -140,7 +140,6 @@ dialog_id_release(vlc_dialog_id *p_id)
         free(p_id->answer.u.login.psz_password);
     }
     free(p_id->psz_progress_text);
-    vlc_mutex_destroy(&p_id->lock);
     vlc_cond_destroy(&p_id->wait);
     free(p_id);
 }
@@ -245,7 +244,6 @@ libvlc_InternalDialogClean(libvlc_int_t *p_libvlc)
     dialog_clear_all_locked(p_provider);
     vlc_mutex_unlock(&p_provider->lock);
 
-    vlc_mutex_destroy(&p_provider->lock);
     free(p_provider);
     libvlc_priv(p_libvlc)->p_dialog_provider = NULL;
 }
index 2d370de..c40fa19 100644 (file)
@@ -456,11 +456,6 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
  */
 void libvlc_InternalDestroy( libvlc_int_t *p_libvlc )
 {
-    libvlc_priv_t *priv = libvlc_priv( p_libvlc );
-
-    vlc_ExitDestroy( &priv->exit );
-
-    vlc_mutex_destroy(&priv->lock);
     vlc_object_delete(p_libvlc);
 }
 
index e91587f..d2d112a 100644 (file)
@@ -73,7 +73,6 @@ typedef struct vlc_exit
 } vlc_exit_t;
 
 void vlc_ExitInit( vlc_exit_t * );
-void vlc_ExitDestroy( vlc_exit_t * );
 
 /*
  * LibVLC objects stuff
index a0efbec..1a7d480 100644 (file)
@@ -613,7 +613,6 @@ vlc_meta_Set
 vlc_meta_SetStatus
 vlc_meta_TypeToLocalizedString
 vlc_mime_Ext2Mime
-vlc_mutex_destroy
 vlc_mutex_init
 vlc_mutex_init_recursive
 vlc_mutex_lock
index f6ac776..71b37d4 100644 (file)
@@ -243,7 +243,6 @@ vlc_media_source_provider_New(vlc_object_t *parent)
 void
 vlc_media_source_provider_Delete(vlc_media_source_provider_t *provider)
 {
-    vlc_mutex_destroy(&provider->lock);
     ReleaseObject(provider);
 }
 
index 0173257..5774b29 100644 (file)
@@ -204,7 +204,6 @@ vlc_media_tree_Delete(vlc_media_tree_t *tree)
         free(listener);
     vlc_list_init(&priv->listeners); /* reset */
     vlc_media_tree_DestroyRootNode(tree);
-    vlc_mutex_destroy(&priv->lock);
     free(tree);
 }
 
index 1e19943..a7a3414 100644 (file)
@@ -124,7 +124,6 @@ void addon_entry_Release( addon_entry_t * p_entry )
     }
     ARRAY_RESET( p_entry->files );
 
-    vlc_mutex_destroy( &p_entry->lock );
     free( owner );
 }
 
@@ -199,7 +198,6 @@ void addons_manager_Delete( addons_manager_t *p_manager )
     ARRAY_FOREACH( p_entry, p_manager->p_priv->name.entries )\
         addon_entry_Release( p_entry );\
     ARRAY_RESET( p_manager->p_priv->name.entries );\
-    vlc_mutex_destroy( &p_manager->p_priv->name.lock );\
     vlc_cond_destroy( &p_manager->p_priv->name.waitcond );\
     vlc_interrupt_destroy( p_manager->p_priv->name.p_interrupt );
 
index 0401435..4bba9e0 100644 (file)
@@ -171,7 +171,6 @@ static struct background_worker *background_worker_Create(void *owner,
 static void background_worker_Destroy(struct background_worker *worker)
 {
     vlc_cond_destroy(&worker->queue_wait);
-    vlc_mutex_destroy(&worker->lock);
     free(worker);
 }
 
index 150f727..e547277 100644 (file)
@@ -80,8 +80,6 @@ void vlc_event_manager_fini( vlc_event_manager_t * p_em )
 {
     struct vlc_event_listener_t * listener;
 
-    vlc_mutex_destroy( &p_em->lock );
-
     for( size_t i = 0; i < ARRAY_SIZE(p_em->events); i++ )
     {
         struct vlc_event_listeners_group_t *slot = p_em->events + i;
index 27985a4..d6cb0ad 100644 (file)
@@ -34,12 +34,6 @@ void vlc_ExitInit( vlc_exit_t *exit )
     exit->opaque = NULL;
 }
 
-void vlc_ExitDestroy( vlc_exit_t *exit )
-{
-    vlc_mutex_destroy( &exit->lock );
-}
-
-
 /**
  * Registers a callback for the LibVLC exit event.
  */
index e11aebd..836f29d 100644 (file)
@@ -162,7 +162,6 @@ void block_FifoRelease( block_fifo_t *p_fifo )
 {
     block_ChainRelease( p_fifo->p_first );
     vlc_cond_destroy( &p_fifo->wait );
-    vlc_mutex_destroy( &p_fifo->lock );
     free( p_fifo );
 }
 
index f4c9682..2049b1b 100644 (file)
@@ -289,7 +289,6 @@ void vlc_http_cookies_destroy( vlc_http_cookie_jar_t * p_jar )
         cookie_destroy( vlc_array_item_at_index( &p_jar->cookies, i ) );
 
     vlc_array_clear( &p_jar->cookies );
-    vlc_mutex_destroy( &p_jar->lock );
 
     free( p_jar );
 }
index d2a04a7..f272b6e 100644 (file)
@@ -71,7 +71,6 @@ vlc_interrupt_t *vlc_interrupt_create(void)
 void vlc_interrupt_deinit(vlc_interrupt_t *ctx)
 {
     assert(ctx->callback == NULL);
-    vlc_mutex_destroy(&ctx->lock);
 }
 
 void vlc_interrupt_destroy(vlc_interrupt_t *ctx)
index b1ce790..10013c7 100644 (file)
@@ -111,7 +111,6 @@ vlc_medialibrary_t* libvlc_MlCreate( libvlc_int_t* p_libvlc  )
     p_ml->m.p_module = module_need( &p_ml->m, "medialibrary", NULL, false );
     if ( p_ml->m.p_module == NULL )
     {
-        vlc_mutex_destroy( &p_ml->lock );
         vlc_object_delete(&p_ml->m);
         return NULL;
     }
@@ -123,7 +122,6 @@ void libvlc_MlRelease( vlc_medialibrary_t* p_ml )
     assert( p_ml != NULL );
     module_unneed( &p_ml->m, p_ml->m.p_module );
     assert( vlc_list_is_empty( &p_ml->cbs ) );
-    vlc_mutex_destroy( &p_ml->lock );
     vlc_object_delete(&p_ml->m);
 }
 
index 0872511..898e4be 100644 (file)
@@ -257,7 +257,6 @@ static void vlc_LogEarlyClose(void *d)
         free(log);
     }
 
-    vlc_mutex_destroy(&early->lock);
     free(early);
 }
 
index f87edd9..f7e68c4 100644 (file)
@@ -129,7 +129,6 @@ void vlc_object_deinit(vlc_object_t *obj)
     vlc_restorecancel(canc);
 
     vlc_cond_destroy(&priv->var_wait);
-    vlc_mutex_destroy(&priv->var_lock);
     free(priv);
 }
 
index 72ad2f6..bda20f5 100644 (file)
@@ -142,7 +142,6 @@ void picture_fifo_OffsetDate(picture_fifo_t *fifo, vlc_tick_t delta)
 void picture_fifo_Delete(picture_fifo_t *fifo)
 {
     picture_fifo_Flush(fifo, VLC_TICK_INVALID, true);
-    vlc_mutex_destroy(&fifo->lock);
     free(fifo);
 }
 
index 0eb5351..9190af9 100644 (file)
@@ -56,7 +56,6 @@ static void picture_pool_Destroy(picture_pool_t *pool)
 
     atomic_thread_fence(memory_order_acquire);
     vlc_cond_destroy(&pool->wait);
-    vlc_mutex_destroy(&pool->lock);
     aligned_free(pool);
 }
 
index 58f2e42..7bde716 100644 (file)
@@ -130,14 +130,6 @@ void vlc_mutex_init_recursive(vlc_mutex_t *mtx)
     vlc_mutex_init_common(mtx, true);
 }
 
-void vlc_mutex_destroy(vlc_mutex_t *mtx)
-{
-    assert(atomic_load_explicit(&mtx->value, memory_order_relaxed) == 0);
-    assert(atomic_load_explicit(&mtx->recursion, memory_order_relaxed) <= 1);
-    assert(atomic_load_explicit(&mtx->owner, memory_order_relaxed) == NULL);
-    (void) mtx;
-}
-
 static _Thread_local char thread_self[1];
 #define THREAD_SELF ((const void *)thread_self)
 
@@ -244,7 +236,6 @@ void vlc_cond_init_daytime(vlc_cond_t *cond)
 void vlc_cond_destroy(vlc_cond_t *cond)
 {
     assert(cond->head == NULL);
-    vlc_mutex_destroy(&cond->lock);
 }
 
 struct vlc_cond_waiter {
@@ -426,7 +417,6 @@ void vlc_rwlock_init (vlc_rwlock_t *lock)
 void vlc_rwlock_destroy (vlc_rwlock_t *lock)
 {
     vlc_cond_destroy (&lock->wait);
-    vlc_mutex_destroy (&lock->mutex);
 }
 
 void vlc_rwlock_rdlock (vlc_rwlock_t *lock)
index f5d6dc4..44a446d 100644 (file)
@@ -147,8 +147,6 @@ void update_Delete( update_t *p_update )
         vlc_object_delete(p_update->p_download);
     }
 
-    vlc_mutex_destroy( &p_update->lock );
-
     free( p_update->release.psz_url );
     free( p_update->release.psz_desc );
     free( p_update->p_pkey );
index 2b56c17..177abcc 100644 (file)
@@ -866,7 +866,6 @@ void httpd_StreamDelete(httpd_stream_t *stream)
         free(stream->p_http_headers[i].value);
     }
     free(stream->p_http_headers);
-    vlc_mutex_destroy(&stream->lock);
     free(stream->psz_mime);
     free(stream->p_header);
     free(stream->p_buffer);
@@ -993,7 +992,6 @@ error:
     if (host) {
         net_ListenClose(host->fds);
         vlc_cond_destroy(&host->wait);
-        vlc_mutex_destroy(&host->lock);
         vlc_object_delete(host);
     }
 
@@ -1030,7 +1028,6 @@ void httpd_HostDelete(httpd_host_t *host)
     vlc_tls_ServerDelete(host->p_tls);
     net_ListenClose(host->fds);
     vlc_cond_destroy(&host->wait);
-    vlc_mutex_destroy(&host->lock);
     vlc_object_delete(host);
     vlc_mutex_unlock(&httpd.mutex);
 }
@@ -1117,7 +1114,6 @@ void httpd_UrlDelete(httpd_url_t *url)
     vlc_mutex_lock(&host->lock);
     vlc_list_remove(&url->node);
 
-    vlc_mutex_destroy(&url->lock);
     free(url->psz_url);
     free(url->psz_user);
     free(url->psz_password);
index c30cdad..d7d07f6 100644 (file)
@@ -160,7 +160,6 @@ unsigned long _System _DLL_InitTerm(unsigned long hmod, unsigned long flag)
             vlc_rwlock_destroy (&config_lock);
             vlc_threadvar_delete (&thread_key);
             vlc_cond_destroy (&super_variable);
-            vlc_mutex_destroy (&super_mutex);
 
             _CRT_term();
 
index 48c0390..6eedc71 100644 (file)
@@ -1843,9 +1843,6 @@ vlc_player_InitLocks(vlc_player_t *player, enum vlc_player_lock_type lock_type)
 static void
 vlc_player_DestroyLocks(vlc_player_t *player)
 {
-    vlc_mutex_destroy(&player->lock);
-    vlc_mutex_destroy(&player->vout_listeners_lock);
-    vlc_mutex_destroy(&player->aout_listeners_lock);
     vlc_cond_destroy(&player->start_delay_cond);
     vlc_cond_destroy(&player->destructor.wait);
 }
index 56bbdc0..1be28b2 100644 (file)
@@ -537,5 +537,4 @@ vlc_player_DestroyTimer(vlc_player_t *player)
 {
     for (size_t i = 0; i < VLC_PLAYER_TIMER_TYPE_COUNT; ++i)
         assert(vlc_list_is_empty(&player->timer.sources[i].listeners));
-    vlc_mutex_destroy(&player->timer.lock);
 }
index 713a913..f84f17c 100644 (file)
@@ -122,7 +122,6 @@ int vlc_timer_create (vlc_timer_t *id, void (*func) (void *), void *data)
                    VLC_THREAD_PRIORITY_INPUT))
     {
         vlc_cond_destroy (&timer->reschedule);
-        vlc_mutex_destroy (&timer->lock);
         free (timer);
         return ENOMEM;
     }
@@ -140,7 +139,6 @@ void vlc_timer_destroy (vlc_timer_t timer)
 
     vlc_join (timer->thread, NULL);
     vlc_cond_destroy (&timer->reschedule);
-    vlc_mutex_destroy (&timer->lock);
     free (timer);
 }
 
index ac5c3eb..5bb4aa1 100644 (file)
@@ -481,7 +481,5 @@ void input_fetcher_Delete( input_fetcher_t* fetcher )
     background_worker_Delete( fetcher->downloader );
 
     vlc_dictionary_clear( &fetcher->album_cache, FreeCacheEntry, NULL );
-    vlc_mutex_destroy( &fetcher->lock );
-
     free( fetcher );
 }
index 80daa2a..239a819 100644 (file)
@@ -131,7 +131,6 @@ sout_instance_t *sout_NewInstance( vlc_object_t *p_parent, const char *psz_dest
 
     FREENULL( p_sout->psz_sout );
 
-    vlc_mutex_destroy( &p_sout->lock );
     vlc_object_delete(p_sout);
     return NULL;
 }
@@ -147,8 +146,6 @@ void sout_DeleteInstance( sout_instance_t * p_sout )
     /* *** free all string *** */
     FREENULL( p_sout->psz_sout );
 
-    vlc_mutex_destroy( &p_sout->lock );
-
     /* *** free structure *** */
     vlc_object_delete(p_sout);
 }
index 1162305..6b40c30 100644 (file)
@@ -108,7 +108,5 @@ int main (void)
 
     vlc_timer_destroy (data.timer);
     vlc_cond_destroy (&data.wait);
-    vlc_mutex_destroy (&data.lock);
-
     return 0;
 }
index 616ea56..c149310 100644 (file)
@@ -69,7 +69,6 @@ void vout_control_Clean(vout_control_t *ctrl)
     }
     ARRAY_RESET(ctrl->cmd);
 
-    vlc_mutex_destroy(&ctrl->lock);
     vlc_cond_destroy(&ctrl->wait_request);
     vlc_cond_destroy(&ctrl->wait_available);
 }
index 9d207ac..99ba7b2 100644 (file)
@@ -187,7 +187,6 @@ vlc_gl_t *vlc_gl_surface_Create(vlc_object_t *obj,
     return gl;
 
 error:
-    vlc_mutex_destroy(&sys->lock);
     free(sys);
     return NULL;
 }
@@ -230,6 +229,5 @@ void vlc_gl_surface_Destroy(vlc_gl_t *gl)
     vlc_gl_Release(gl);
     vout_window_Disable(surface);
     vout_window_Delete(surface);
-    vlc_mutex_destroy(&sys->lock);
     free(sys);
 }
index 92b5886..b18297c 100644 (file)
@@ -78,7 +78,6 @@ void vout_snapshot_Destroy(vout_snapshot_t *snap)
     }
 
     vlc_cond_destroy(&snap->wait);
-    vlc_mutex_destroy(&snap->lock);
     free(snap);
 }
 
index edda78d..229b010 100644 (file)
@@ -1845,10 +1845,6 @@ void vout_Release(vout_thread_t *vout)
 
     free(sys->splitter_name);
 
-    /* Destroy the locks */
-    vlc_mutex_destroy(&sys->window_lock);
-    vlc_mutex_destroy(&sys->filter.lock);
-
     if (sys->dec_device)
         vlc_decoder_device_Release(sys->dec_device);
 
@@ -1856,7 +1852,6 @@ void vout_Release(vout_thread_t *vout)
     vout_display_window_Delete(sys->display_cfg.window);
 
     vout_control_Clean(&sys->control);
-    vlc_mutex_destroy(&sys->display_lock);
 
     /* */
     vout_statistic_Clean(&sys->statistic);
index 3efd76f..2a4a79a 100644 (file)
@@ -1582,7 +1582,6 @@ static void spu_Cleanup(spu_t *spu)
 
     if (sys->text)
         FilterRelease(sys->text);
-    vlc_mutex_destroy(&sys->textlock);
 
     if (sys->scale_yuvp)
         FilterRelease(sys->scale_yuvp);
@@ -1601,7 +1600,6 @@ static void spu_Cleanup(spu_t *spu)
                              SubFilterDelProxyCallbacks, sys->vout);
     filter_chain_Delete(sys->filter_chain);
     free(sys->filter_chain_current);
-    vlc_mutex_destroy(&sys->filter_chain_lock);
     free(sys->source_chain_update);
     free(sys->filter_chain_update);
 
@@ -1611,9 +1609,6 @@ static void spu_Cleanup(spu_t *spu)
 
     vlc_vector_destroy(&sys->channels);
 
-    vlc_mutex_destroy(&sys->lock);
-
-    vlc_mutex_destroy(&sys->prerender.lock);
     vlc_cond_destroy(&sys->prerender.cond);
     vlc_cond_destroy(&sys->prerender.output_cond);
     vlc_vector_clear(&sys->prerender.vector);
index 16ebf9e..9c2df5c 100644 (file)
@@ -82,7 +82,6 @@ vout_window_t *vout_window_New(vlc_object_t *obj, const char *module,
     w->module = vlc_module_load(window, "vout window", module, false,
                                 vout_window_start, window);
     if (!w->module) {
-        vlc_mutex_destroy(&w->lock);
         vlc_object_delete(window);
         return NULL;
     }
@@ -141,7 +140,6 @@ void vout_window_Delete(vout_window_t *window)
         window->ops->destroy(window);
 
     vlc_objres_clear(VLC_OBJECT(window));
-    vlc_mutex_destroy(&w->lock);
     vlc_object_delete(window);
 }