[vlc-commits] thread: remove vlc_mutex_destroy()

Rémi Denis-Courmont git at videolan.org
Fri Feb 21 18:26:21 CET 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Feb 20 21:39:27 2020 +0200| [a3226cf890ae7e6ea817e72520dcd99388c105e1] | committer: Rémi Denis-Courmont

thread: remove vlc_mutex_destroy()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a3226cf890ae7e6ea817e72520dcd99388c105e1
---

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

diff --git a/include/vlc_cxx_helpers.hpp b/include/vlc_cxx_helpers.hpp
index 2f256016e5..67175407ac 100644
--- a/include/vlc_cxx_helpers.hpp
+++ b/include/vlc_cxx_helpers.hpp
@@ -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;
diff --git a/include/vlc_threads.h b/include/vlc_threads.h
index 48008461e4..c87eac7b08 100644
--- a/include/vlc_threads.h
+++ b/include/vlc_threads.h
@@ -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.
  *
diff --git a/lib/core.c b/lib/core.c
index 52549a139d..56b985f597 100644
--- a/lib/core.c
+++ b/lib/core.c
@@ -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 );
diff --git a/lib/event.c b/lib/event.c
index 28d3d0c232..96a17e1b19 100644
--- a/lib/event.c
+++ b/lib/event.c
@@ -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));
 
diff --git a/lib/media.c b/lib/media.c
index f045c729d2..b2277e58d0 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -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;
diff --git a/lib/media_list.c b/lib/media_list.c
index c4584c3a20..e8a8a25881 100644
--- a/lib/media_list.c
+++ b/lib/media_list.c
@@ -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 );
diff --git a/lib/media_list_player.c b/lib/media_list_player.c
index 6a96f5aee3..6e02a807d9 100644
--- a/lib/media_list_player.c
+++ b/lib/media_list_player.c
@@ -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);
 }
diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index a299878282..90b811e159 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -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);
 
diff --git a/modules/access/decklink.cpp b/modules/access/decklink.cpp
index d2ba30e111..e24fd128c7 100644
--- a/modules/access/decklink.cpp
+++ b/modules/access/decklink.cpp
@@ -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);
 }
 
diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp
index f5a6604d6a..d977070d0c 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -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 );
diff --git a/modules/access/dtv/bdagraph.cpp b/modules/access/dtv/bdagraph.cpp
index 77d42ee56c..62a6133099 100644
--- a/modules/access/dtv/bdagraph.cpp
+++ b/modules/access/dtv/bdagraph.cpp
@@ -321,7 +321,6 @@ BDAOutput::BDAOutput( vlc_object_t *p_access ) :
 BDAOutput::~BDAOutput()
 {
     Empty();
-    vlc_mutex_destroy( &lock );
     vlc_cond_destroy( &wait );
 }
 
diff --git a/modules/access/dv.c b/modules/access/dv.c
index 14d538f3c1..8a8baa104d 100644
--- a/modules/access/dv.c
+++ b/modules/access/dv.c
@@ -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 );
 }
 
 /*****************************************************************************
diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index fb1b1aef63..3b18266ac8 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -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++ )
     {
diff --git a/modules/access/http/h2conn.c b/modules/access/http/h2conn.c
index e2c9de6e86..20c7e5b0e4 100644
--- a/modules/access/http/h2conn.c
+++ b/modules/access/http/h2conn.c
@@ -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;
     }
diff --git a/modules/access/http/h2output.c b/modules/access/http/h2output.c
index bfb41208ca..1d038ecc2d 100644
--- a/modules/access/http/h2output.c
+++ b/modules/access/http/h2output.c
@@ -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);
diff --git a/modules/access/mms/mmstu.c b/modules/access/mms/mmstu.c
index d96cf22289..4c0c5a62e6 100644
--- a/modules/access/mms/mmstu.c
+++ b/modules/access/mms/mmstu.c
@@ -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;
     }
diff --git a/modules/access/rist.c b/modules/access/rist.c
index 0c0d49eae7..be4b0b8058 100644
--- a/modules/access/rist.c
+++ b/modules/access/rist.c
@@ -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)
diff --git a/modules/access/srt.c b/modules/access/srt.c
index ac73fbcebf..ab52ba4fcc 100644
--- a/modules/access/srt.c
+++ b/modules/access/srt.c
@@ -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 );
diff --git a/modules/access_output/rist.c b/modules/access_output/rist.c
index 3f2f3901bd..ca967016eb 100644
--- a/modules/access_output/rist.c
+++ b/modules/access_output/rist.c
@@ -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);
 }
diff --git a/modules/access_output/srt.c b/modules/access_output/srt.c
index da55a30478..0b66f24a8a 100644
--- a/modules/access_output/srt.c
+++ b/modules/access_output/srt.c
@@ -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 );
diff --git a/modules/audio_filter/compressor.c b/modules/audio_filter/compressor.c
index 402cbb5ed1..5aab1ceaac 100644
--- a/modules/audio_filter/compressor.c
+++ b/modules/audio_filter/compressor.c
@@ -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 );
 }
diff --git a/modules/audio_filter/equalizer.c b/modules/audio_filter/equalizer.c
index c63547f569..92ccaf85b2 100644
--- a/modules/audio_filter/equalizer.c
+++ b/modules/audio_filter/equalizer.c
@@ -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 );
 }
 
diff --git a/modules/audio_filter/spatializer/spatializer.cpp b/modules/audio_filter/spatializer/spatializer.cpp
index eccde1331e..4f9c19b133 100644
--- a/modules/audio_filter/spatializer/spatializer.cpp
+++ b/modules/audio_filter/spatializer/spatializer.cpp
@@ -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" );
 }
diff --git a/modules/audio_output/amem.c b/modules/audio_output/amem.c
index f8f7627ef3..176d2237c6 100644
--- a/modules/audio_output/amem.c
+++ b/modules/audio_output/amem.c
@@ -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);
 }
diff --git a/modules/audio_output/audiotrack.c b/modules/audio_output/audiotrack.c
index 3fcd79c7a5..683e16a9d7 100644
--- a/modules/audio_output/audiotrack.c
+++ b/modules/audio_output/audiotrack.c
@@ -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 );
diff --git a/modules/audio_output/audiounit_ios.m b/modules/audio_output/audiounit_ios.m
index 072de41534..e0547b514f 100644
--- a/modules/audio_output/audiounit_ios.m
+++ b/modules/audio_output/audiounit_ios.m
@@ -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;
     }
diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index 6c96d802fc..434de23c21 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -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);
 }
 
diff --git a/modules/audio_output/coreaudio_common.c b/modules/audio_output/coreaudio_common.c
index f38490ea1d..900616a8aa 100644
--- a/modules/audio_output/coreaudio_common.c
+++ b/modules/audio_output/coreaudio_common.c
@@ -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,
diff --git a/modules/audio_output/coreaudio_common.h b/modules/audio_output/coreaudio_common.h
index d6949b403c..49f6779234 100644
--- a/modules/audio_output/coreaudio_common.h
+++ b/modules/audio_output/coreaudio_common.h
@@ -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);
 
diff --git a/modules/audio_output/directsound.c b/modules/audio_output/directsound.c
index f4d7efea6d..9f3ec0463d 100644
--- a/modules/audio_output/directsound.c
+++ b/modules/audio_output/directsound.c
@@ -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 )
     {
diff --git a/modules/audio_output/kai.c b/modules/audio_output/kai.c
index dd75e367d8..b565619795 100644
--- a/modules/audio_output/kai.c
+++ b/modules/audio_output/kai.c
@@ -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 );
diff --git a/modules/audio_output/opensles_android.c b/modules/audio_output/opensles_android.c
index b1c2a0d985..424baf2b04 100644
--- a/modules/audio_output/opensles_android.c
+++ b/modules/audio_output/opensles_android.c
@@ -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);
 }
 
diff --git a/modules/audio_output/waveout.c b/modules/audio_output/waveout.c
index 990b1e8b8d..e3c06bb008 100644
--- a/modules/audio_output/waveout.c
+++ b/modules/audio_output/waveout.c
@@ -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);
 }
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 8e35104e8b..b2d5271755 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -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 );
 }
 
diff --git a/modules/codec/dmo/dmo.c b/modules/codec/dmo/dmo.c
index f129ab9ef1..aef0710417 100644
--- a/modules/codec/dmo/dmo.c
+++ b/modules/codec/dmo/dmo.c
@@ -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 );
 }
 
diff --git a/modules/codec/kate.c b/modules/codec/kate.c
index 77b6b5b7c0..531b812978 100644
--- a/modules/codec/kate.c
+++ b/modules/codec/kate.c
@@ -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 )
diff --git a/modules/codec/libass.c b/modules/codec/libass.c
index aff12c942a..dbaa5f5c4c 100644
--- a/modules/codec/libass.c
+++ b/modules/codec/libass.c
@@ -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 );
diff --git a/modules/codec/omxil/mediacodec.c b/modules/codec/omxil/mediacodec.c
index be92640be6..ec2536dbe5 100644
--- a/modules/codec/omxil/mediacodec.c
+++ b/modules/codec/omxil/mediacodec.c
@@ -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);
 
diff --git a/modules/codec/omxil/omxil_utils.h b/modules/codec/omxil/omxil_utils.h
index c08f280e7b..6617534dff 100644
--- a/modules/codec/omxil/omxil_utils.h
+++ b/modules/codec/omxil/omxil_utils.h
@@ -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;
diff --git a/modules/codec/omxil/utils.c b/modules/codec/omxil/utils.c
index ee30252bda..ba3de5cfd1 100644
--- a/modules/codec/omxil/utils.c
+++ b/modules/codec/omxil/utils.c
@@ -50,7 +50,6 @@ void InitOmxEventQueue(OmxEventQueue *queue)
 
 void DeinitOmxEventQueue(OmxEventQueue *queue)
 {
-    vlc_mutex_destroy(&queue->mutex);
     vlc_cond_destroy(&queue->cond);
 }
 
diff --git a/modules/codec/videotoolbox.c b/modules/codec/videotoolbox.c
index edf39a88a2..5e1bc09a10 100644
--- a/modules/codec/videotoolbox.c
+++ b/modules/codec/videotoolbox.c
@@ -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);
diff --git a/modules/codec/zvbi.c b/modules/codec/zvbi.c
index 2670df952c..262bb92607 100644
--- a/modules/codec/zvbi.c
+++ b/modules/codec/zvbi.c
@@ -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 );
diff --git a/modules/control/dbus/dbus.c b/modules/control/dbus/dbus.c
index ed386bdbba..dfe3afb181 100644
--- a/modules/control/dbus/dbus.c
+++ b/modules/control/dbus/dbus.c
@@ -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 );
diff --git a/modules/control/gestures.c b/modules/control/gestures.c
index 668be6936a..4497a44521 100644
--- a/modules/control/gestures.c
+++ b/modules/control/gestures.c
@@ -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 );
 }
 
diff --git a/modules/control/globalhotkeys/win32.c b/modules/control/globalhotkeys/win32.c
index 2a0e3a2954..39c34f211e 100644
--- a/modules/control/globalhotkeys/win32.c
+++ b/modules/control/globalhotkeys/win32.c
@@ -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 );
 }
diff --git a/modules/control/rc.c b/modules/control/rc.c
index cdfa70b08c..8f7161ecd6 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -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 );
 }
 
diff --git a/modules/demux/adaptive/PlaylistManager.cpp b/modules/demux/adaptive/PlaylistManager.cpp
index a8bce7aca1..c0d3c9a8e1 100644
--- a/modules/demux/adaptive/PlaylistManager.cpp
+++ b/modules/demux/adaptive/PlaylistManager.cpp
@@ -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()
diff --git a/modules/demux/adaptive/Streams.cpp b/modules/demux/adaptive/Streams.cpp
index c4119da5d8..12c0a3183b 100644
--- a/modules/demux/adaptive/Streams.cpp
+++ b/modules/demux/adaptive/Streams.cpp
@@ -119,8 +119,6 @@ AbstractStream::~AbstractStream()
     delete demuxer;
     delete demuxersource;
     delete fakeesout;
-
-    vlc_mutex_destroy(&lock);
 }
 
 void AbstractStream::prepareRestart(bool b_discontinuity)
diff --git a/modules/demux/adaptive/encryption/Keyring.cpp b/modules/demux/adaptive/encryption/Keyring.cpp
index bd34f3c7ed..95613b1a12 100644
--- a/modules/demux/adaptive/encryption/Keyring.cpp
+++ b/modules/demux/adaptive/encryption/Keyring.cpp
@@ -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)
diff --git a/modules/demux/adaptive/http/Chunk.cpp b/modules/demux/adaptive/http/Chunk.cpp
index 3ec89fd4a1..384c640cf1 100644
--- a/modules/demux/adaptive/http/Chunk.cpp
+++ b/modules/demux/adaptive/http/Chunk.cpp
@@ -157,7 +157,6 @@ HTTPChunkSource::~HTTPChunkSource()
 {
     if(connection)
         connection->setUsed(false);
-    vlc_mutex_destroy(&lock);
 }
 
 bool HTTPChunkSource::init(const std::string &url)
diff --git a/modules/demux/adaptive/http/Downloader.cpp b/modules/demux/adaptive/http/Downloader.cpp
index 7d0ec6e741..f2f96c4e8c 100644
--- a/modules/demux/adaptive/http/Downloader.cpp
+++ b/modules/demux/adaptive/http/Downloader.cpp
@@ -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)
diff --git a/modules/demux/adaptive/http/HTTPConnectionManager.cpp b/modules/demux/adaptive/http/HTTPConnectionManager.cpp
index 96967afd76..d1c5e556ec 100644
--- a/modules/demux/adaptive/http/HTTPConnectionManager.cpp
+++ b/modules/demux/adaptive/http/HTTPConnectionManager.cpp
@@ -74,7 +74,6 @@ HTTPConnectionManager::~HTTPConnectionManager   ()
     delete downloader;
     delete factory;
     this->closeAllConnections();
-    vlc_mutex_destroy(&lock);
 }
 
 void HTTPConnectionManager::closeAllConnections      ()
diff --git a/modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp b/modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp
index ff4f7a7821..9afdead977 100644
--- a/modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp
+++ b/modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp
@@ -60,7 +60,6 @@ NearOptimalAdaptationLogic::NearOptimalAdaptationLogic(vlc_object_t *obj)
 
 NearOptimalAdaptationLogic::~NearOptimalAdaptationLogic()
 {
-    vlc_mutex_destroy(&lock);
 }
 
 BaseRepresentation *
diff --git a/modules/demux/adaptive/logic/PredictiveAdaptationLogic.cpp b/modules/demux/adaptive/logic/PredictiveAdaptationLogic.cpp
index c81b40b59c..81f171f372 100644
--- a/modules/demux/adaptive/logic/PredictiveAdaptationLogic.cpp
+++ b/modules/demux/adaptive/logic/PredictiveAdaptationLogic.cpp
@@ -63,7 +63,6 @@ PredictiveAdaptationLogic::PredictiveAdaptationLogic(vlc_object_t *obj)
 
 PredictiveAdaptationLogic::~PredictiveAdaptationLogic()
 {
-    vlc_mutex_destroy(&lock);
 }
 
 BaseRepresentation *PredictiveAdaptationLogic::getNextRepresentation(BaseAdaptationSet *adaptSet, BaseRepresentation *prevRep)
diff --git a/modules/demux/adaptive/logic/RateBasedAdaptationLogic.cpp b/modules/demux/adaptive/logic/RateBasedAdaptationLogic.cpp
index bb7b6e9f73..2885110f83 100644
--- a/modules/demux/adaptive/logic/RateBasedAdaptationLogic.cpp
+++ b/modules/demux/adaptive/logic/RateBasedAdaptationLogic.cpp
@@ -49,7 +49,6 @@ RateBasedAdaptationLogic::RateBasedAdaptationLogic  (vlc_object_t *obj) :
 
 RateBasedAdaptationLogic::~RateBasedAdaptationLogic()
 {
-    vlc_mutex_destroy(&lock);
 }
 
 BaseRepresentation *RateBasedAdaptationLogic::getNextRepresentation(BaseAdaptationSet *adaptSet, BaseRepresentation *currep)
diff --git a/modules/demux/adaptive/plumbing/FakeESOut.cpp b/modules/demux/adaptive/plumbing/FakeESOut.cpp
index 052191d3e0..fec642e385 100644
--- a/modules/demux/adaptive/plumbing/FakeESOut.cpp
+++ b/modules/demux/adaptive/plumbing/FakeESOut.cpp
@@ -165,7 +165,6 @@ FakeESOut::~FakeESOut()
     gc();
 
     delete commandsqueue;
-    vlc_mutex_destroy(&lock);
 }
 
 void FakeESOut::resetTimestamps()
diff --git a/modules/demux/mkv/demux.cpp b/modules/demux/mkv/demux.cpp
index 6fde3aa8c3..99f1cd67d1 100644
--- a/modules/demux/mkv/demux.cpp
+++ b/modules/demux/mkv/demux.cpp
@@ -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 );
 }
 
 
diff --git a/modules/demux/mkv/events.cpp b/modules/demux/mkv/events.cpp
index 93cf963340..0a6d7003a4 100644
--- a/modules/demux/mkv/events.cpp
+++ b/modules/demux/mkv/events.cpp
@@ -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)
diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index d17012744a..3bd6d0e001 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -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 );
 
diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c
index 8e3156050b..e91ac5927c 100644
--- a/modules/gui/ncurses.c
+++ b/modules/gui/ncurses.c
@@ -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);
diff --git a/modules/gui/qt/medialibrary/mlbasemodel.cpp b/modules/gui/qt/medialibrary/mlbasemodel.cpp
index faec9d28a7..3ba327f171 100644
--- a/modules/gui/qt/medialibrary/mlbasemodel.cpp
+++ b/modules/gui/qt/medialibrary/mlbasemodel.cpp
@@ -44,7 +44,6 @@ MLBaseModel::MLBaseModel(QObject *parent)
 
 MLBaseModel::~MLBaseModel()
 {
-    vlc_mutex_destroy( &m_item_lock );
 }
 
 void MLBaseModel::sortByColumn(QByteArray name, Qt::SortOrder order)
diff --git a/modules/gui/skins2/commands/async_queue.cpp b/modules/gui/skins2/commands/async_queue.cpp
index bf601b9bad..fab0741c65 100644
--- a/modules/gui/skins2/commands/async_queue.cpp
+++ b/modules/gui/skins2/commands/async_queue.cpp
@@ -45,7 +45,6 @@ AsyncQueue::AsyncQueue( intf_thread_t *pIntf ): SkinObject( pIntf ),
 AsyncQueue::~AsyncQueue()
 {
     delete( m_pTimer );
-    vlc_mutex_destroy( &m_lock );
 }
 
 
diff --git a/modules/gui/skins2/commands/cmd_callbacks.hpp b/modules/gui/skins2/commands/cmd_callbacks.hpp
index f9c8d96638..79fb556aa3 100644
--- a/modules/gui/skins2/commands/cmd_callbacks.hpp
+++ b/modules/gui/skins2/commands/cmd_callbacks.hpp
@@ -71,7 +71,6 @@ public:
     virtual ~CmdExecuteBlock()
     {
         vlc_cond_destroy( &m_wait );
-        vlc_mutex_destroy( &m_lock );
     }
 
     static void executeWait( const CmdGenericPtr& rcCommand  )
diff --git a/modules/hw/d3d11/d3d11_surface.c b/modules/hw/d3d11/d3d11_surface.c
index 9762ad3fac..6534d309df 100644
--- a/modules/hw/d3d11/d3d11_surface.c
+++ b/modules/hw/d3d11/d3d11_surface.c
@@ -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);
 }
diff --git a/modules/hw/mmal/codec.c b/modules/hw/mmal/codec.c
index e334853b2f..a10ac5637a 100644
--- a/modules/hw/mmal/codec.c
+++ b/modules/hw/mmal/codec.c
@@ -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);
 
diff --git a/modules/hw/mmal/converter.c b/modules/hw/mmal/converter.c
index 1d161c7847..f49f1f0202 100644
--- a/modules/hw/mmal/converter.c
+++ b/modules/hw/mmal/converter.c
@@ -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);
 }
diff --git a/modules/hw/mmal/mmal_cma.c b/modules/hw/mmal/mmal_cma.c
index 600dc0136c..70567db4f4 100644
--- a/modules/hw/mmal/mmal_cma.c
+++ b/modules/hw/mmal/mmal_cma.c
@@ -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)
diff --git a/modules/hw/mmal/mmal_picture.c b/modules/hw/mmal/mmal_picture.c
index 6f6a0727f1..915ee063c8 100644
--- a/modules/hw/mmal/mmal_picture.c
+++ b/modules/hw/mmal/mmal_picture.c
@@ -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);
 }
diff --git a/modules/hw/mmal/vout.c b/modules/hw/mmal/vout.c
index 9204626b55..ee48a6a552 100644
--- a/modules/hw/mmal/vout.c
+++ b/modules/hw/mmal/vout.c
@@ -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')
diff --git a/modules/keystore/memory.c b/modules/keystore/memory.c
index 527433db9a..7981bc7ffc 100644
--- a/modules/keystore/memory.c
+++ b/modules/keystore/memory.c
@@ -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);
 }
 
diff --git a/modules/lua/extension.c b/modules/lua/extension.c
index 5ff93d142d..b4ea69ddb9 100644
--- a/modules/lua/extension.c
+++ b/modules/lua/extension.c
@@ -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 );
diff --git a/modules/lua/libs/dialog.c b/modules/lua/libs/dialog.c
index 927a0a4d9e..8af0409786 100644
--- a/modules/lua/libs/dialog.c
+++ b/modules/lua/libs/dialog.c
@@ -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 );
 
diff --git a/modules/lua/services_discovery.c b/modules/lua/services_discovery.c
index 2bbffe203e..8b5aebdade 100644
--- a/modules/lua/services_discovery.c
+++ b/modules/lua/services_discovery.c
@@ -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 );
diff --git a/modules/misc/audioscrobbler.c b/modules/misc/audioscrobbler.c
index f6d38879f6..ce3ca4161f 100644
--- a/modules/misc/audioscrobbler.c
+++ b/modules/misc/audioscrobbler.c
@@ -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(
diff --git a/modules/misc/fingerprinter.c b/modules/misc/fingerprinter.c
index 0481afb9ce..ebf28147ee 100644
--- a/modules/misc/fingerprinter.c
+++ b/modules/misc/fingerprinter.c
@@ -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);
diff --git a/modules/misc/rtsp.c b/modules/misc/rtsp.c
index d90f754357..9b4a900b50 100644
--- a/modules/misc/rtsp.c
+++ b/modules/misc/rtsp.c
@@ -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 );
 }
 
diff --git a/modules/misc/securetransport.c b/modules/misc/securetransport.c
index fe24951691..3b14f0399a 100644
--- a/modules/misc/securetransport.c
+++ b/modules/misc/securetransport.c
@@ -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);
 
diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
index dc94d12038..042074263c 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -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++ )
diff --git a/modules/notify/notify.c b/modules/notify/notify.c
index 4f6a7e9b85..64017cc8f8 100644
--- a/modules/notify/notify.c
+++ b/modules/notify/notify.c
@@ -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();
 }
diff --git a/modules/services_discovery/podcast.c b/modules/services_discovery/podcast.c
index a29996d59b..e89a757907 100644
--- a/modules/services_discovery/podcast.c
+++ b/modules/services_discovery/podcast.c
@@ -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] );
diff --git a/modules/spu/audiobargraph_v.c b/modules/spu/audiobargraph_v.c
index 06d84d5f8d..de3f9627a6 100644
--- a/modules/spu/audiobargraph_v.c
+++ b/modules/spu/audiobargraph_v.c
@@ -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);
 
diff --git a/modules/spu/dynamicoverlay/dynamicoverlay.c b/modules/spu/dynamicoverlay/dynamicoverlay.c
index 0eae0f00ee..b038a2d66a 100644
--- a/modules/spu/dynamicoverlay/dynamicoverlay.c
+++ b/modules/spu/dynamicoverlay/dynamicoverlay.c
@@ -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 );
diff --git a/modules/spu/logo.c b/modules/spu/logo.c
index f72c841035..fa1ee0307c 100644
--- a/modules/spu/logo.c
+++ b/modules/spu/logo.c
@@ -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 );
 }
diff --git a/modules/spu/marq.c b/modules/spu/marq.c
index 44060a1993..c370c5322d 100644
--- a/modules/spu/marq.c
+++ b/modules/spu/marq.c
@@ -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 );
diff --git a/modules/spu/mosaic.c b/modules/spu/mosaic.c
index e4a876f842..b06ca3fd6f 100644
--- a/modules/spu/mosaic.c
+++ b/modules/spu/mosaic.c
@@ -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 );
 }
 
diff --git a/modules/spu/rss.c b/modules/spu/rss.c
index 2569da02d1..67d3cab920 100644
--- a/modules/spu/rss.c
+++ b/modules/spu/rss.c
@@ -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 );
diff --git a/modules/spu/subsdelay.c b/modules/spu/subsdelay.c
index 8b961e7de2..70b2e9a332 100644
--- a/modules/spu/subsdelay.c
+++ b/modules/spu/subsdelay.c
@@ -518,8 +518,6 @@ static void SubsdelayHeapDestroy( subsdelay_heap_t *p_heap )
     }
 
     SubsdelayHeapUnlock( p_heap );
-
-    vlc_mutex_destroy( &p_heap->lock );
 }
 
 /*****************************************************************************
diff --git a/modules/stream_filter/decomp.c b/modules/stream_filter/decomp.c
index f5fdd94636..9b76980147 100644
--- a/modules/stream_filter/decomp.c
+++ b/modules/stream_filter/decomp.c
@@ -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);
 }
diff --git a/modules/stream_filter/hds/hds.c b/modules/stream_filter/hds/hds.c
index 1b2290ee03..88d1e76522 100644
--- a/modules/stream_filter/hds/hds.c
+++ b/modules/stream_filter/hds/hds.c
@@ -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 )
diff --git a/modules/stream_filter/prefetch.c b/modules/stream_filter/prefetch.c
index 2f610c65bd..01b7e2c681 100644
--- a/modules/stream_filter/prefetch.c
+++ b/modules/stream_filter/prefetch.c
@@ -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)
     {
diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index 9f909a9de1..97b6368295 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -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;
diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c
index 3c2363305a..b0d640436f 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -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 );
diff --git a/modules/stream_out/rtsp.c b/modules/stream_out/rtsp.c
index 6161f6a795..d62ccebccd 100644
--- a/modules/stream_out/rtsp.c
+++ b/modules/stream_out/rtsp.c
@@ -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 );
 }
 
diff --git a/modules/stream_out/sdi/DBMSDIOutput.cpp b/modules/stream_out/sdi/DBMSDIOutput.cpp
index 19de3288e1..9c56b8f02b 100644
--- a/modules/stream_out/sdi/DBMSDIOutput.cpp
+++ b/modules/stream_out/sdi/DBMSDIOutput.cpp
@@ -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)
diff --git a/modules/stream_out/sdi/SDIStream.cpp b/modules/stream_out/sdi/SDIStream.cpp
index a196860c13..0e728c3adf 100644
--- a/modules/stream_out/sdi/SDIStream.cpp
+++ b/modules/stream_out/sdi/SDIStream.cpp
@@ -237,7 +237,6 @@ AbstractDecodedStream::~AbstractDecodedStream()
     deinit();
     es_format_Clean(&requestedoutput);
     vlc_cond_destroy(&inputWait);
-    vlc_mutex_destroy(&inputLock);
 }
 
 void AbstractDecodedStream::deinit()
diff --git a/modules/stream_out/transcode/encoder/encoder.c b/modules/stream_out/transcode/encoder/encoder.c
index e8ffb346ac..2c89332663 100644
--- a/modules/stream_out/transcode/encoder/encoder.c
+++ b/modules/stream_out/transcode/encoder/encoder.c
@@ -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 );
diff --git a/modules/stream_out/transcode/transcode.c b/modules/stream_out/transcode/transcode.c
index c0303d1aba..fc842041dd 100644
--- a/modules/stream_out/transcode/transcode.c
+++ b/modules/stream_out/transcode/transcode.c
@@ -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 )
diff --git a/modules/video_filter/alphamask.c b/modules/video_filter/alphamask.c
index 7268496010..001f37185c 100644
--- a/modules/video_filter/alphamask.c
+++ b/modules/video_filter/alphamask.c
@@ -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 );
 
diff --git a/modules/video_filter/ball.c b/modules/video_filter/ball.c
index d4d8c26f55..563ff8bedc 100644
--- a/modules/video_filter/ball.c
+++ b/modules/video_filter/ball.c
@@ -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 );
diff --git a/modules/video_filter/bluescreen.c b/modules/video_filter/bluescreen.c
index 730af68da8..3fe83a1a5d 100644
--- a/modules/video_filter/bluescreen.c
+++ b/modules/video_filter/bluescreen.c
@@ -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 );
 }
 
diff --git a/modules/video_filter/erase.c b/modules/video_filter/erase.c
index 91a6b7bf89..7e6683b14e 100644
--- a/modules/video_filter/erase.c
+++ b/modules/video_filter/erase.c
@@ -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 );
 }
diff --git a/modules/video_filter/extract.c b/modules/video_filter/extract.c
index 9de5f80228..0e849642a9 100644
--- a/modules/video_filter/extract.c
+++ b/modules/video_filter/extract.c
@@ -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 );
 }
diff --git a/modules/video_filter/gradfun.c b/modules/video_filter/gradfun.c
index b17808465a..093d207523 100644
--- a/modules/video_filter/gradfun.c
+++ b/modules/video_filter/gradfun.c
@@ -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);
 }
 
diff --git a/modules/video_filter/gradient.c b/modules/video_filter/gradient.c
index 671334eb91..22675305f5 100644
--- a/modules/video_filter/gradient.c
+++ b/modules/video_filter/gradient.c
@@ -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 );
diff --git a/modules/video_filter/grain.c b/modules/video_filter/grain.c
index 34cb4ce4f1..174de0a822 100644
--- a/modules/video_filter/grain.c
+++ b/modules/video_filter/grain.c
@@ -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);
 }
 
diff --git a/modules/video_filter/hqdn3d.c b/modules/video_filter/hqdn3d.c
index bd453759dc..beb57974d8 100644
--- a/modules/video_filter/hqdn3d.c
+++ b/modules/video_filter/hqdn3d.c
@@ -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]);
     }
diff --git a/modules/video_filter/postproc.c b/modules/video_filter/postproc.c
index e3fd252eaa..bf0192de2b 100644
--- a/modules/video_filter/postproc.c
+++ b/modules/video_filter/postproc.c
@@ -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 );
diff --git a/modules/video_filter/puzzle.c b/modules/video_filter/puzzle.c
index f85f6a10b2..35e0a090ce 100644
--- a/modules/video_filter/puzzle.c
+++ b/modules/video_filter/puzzle.c
@@ -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);
diff --git a/modules/video_output/decklink.cpp b/modules/video_output/decklink.cpp
index c166233363..3c7c85eb3d 100644
--- a/modules/video_output/decklink.cpp
+++ b/modules/video_output/decklink.cpp
@@ -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) {
diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index 9a075194f2..5c273ded11 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -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];
 }
diff --git a/modules/video_output/splitter.c b/modules/video_output/splitter.c
index 43cccba061..71ceda4674 100644
--- a/modules/video_output/splitter.c
+++ b/modules/video_output/splitter.c
@@ -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;
     }
diff --git a/modules/video_output/wayland/xdg-shell.c b/modules/video_output/wayland/xdg-shell.c
index f6363c641c..765ffb2a2f 100644
--- a/modules/video_output/wayland/xdg-shell.c
+++ b/modules/video_output/wayland/xdg-shell.c
@@ -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
diff --git a/modules/video_output/win32/events.c b/modules/video_output/win32/events.c
index 9e8df25be3..15da61dc26 100644
--- a/modules/video_output/win32/events.c
+++ b/modules/video_output/win32/events.c
@@ -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 );
 }
 
diff --git a/modules/video_output/win32/inhibit.c b/modules/video_output/win32/inhibit.c
index 566b311189..c1d3199ccb 100644
--- a/modules/video_output/win32/inhibit.c
+++ b/modules/video_output/win32/inhibit.c
@@ -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;
     }
 
diff --git a/modules/visualization/goom.c b/modules/visualization/goom.c
index 3fa6203e1c..a9b225f2f9 100644
--- a/modules/visualization/goom.c
+++ b/modules/visualization/goom.c
@@ -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-- )
diff --git a/modules/visualization/projectm.cpp b/modules/visualization/projectm.cpp
index 219dfdac4e..f4b636fb23 100644
--- a/modules/visualization/projectm.cpp
+++ b/modules/visualization/projectm.cpp
@@ -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 );
 }
diff --git a/modules/visualization/vsxu.cpp b/modules/visualization/vsxu.cpp
index 30239177d9..dbbb061ecf 100644
--- a/modules/visualization/vsxu.cpp
+++ b/modules/visualization/vsxu.cpp
@@ -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 );
 }
diff --git a/src/android/thread.c b/src/android/thread.c
index 24eea70ae9..69ec70c25d 100644
--- a/src/android/thread.c
+++ b/src/android/thread.c
@@ -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);
 }
 
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 526489e5f6..d7d013c81d 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -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));
 }
 
diff --git a/src/clock/clock.c b/src/clock/clock.c
index 43c44bed6e..8637d827e4 100644
--- a/src/clock/clock.c
+++ b/src/clock/clock.c
@@ -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);
diff --git a/src/clock/input_clock.c b/src/clock/input_clock.c
index c7724625c4..ac891d8cb9 100644
--- a/src/clock/input_clock.c
+++ b/src/clock/input_clock.c
@@ -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 );
 }
 
diff --git a/src/input/decoder.c b/src/input/decoder.c
index d7f85243d3..fd2e6aa03b 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -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 );
 }
 
diff --git a/src/input/demux_chained.c b/src/input/demux_chained.c
index f2123fd0f7..c8c436daec 100644
--- a/src/input/demux_chained.c
+++ b/src/input/demux_chained.c
@@ -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);
 }
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 7671dc3948..6955192dc0 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -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 );
 }
 
diff --git a/src/input/es_out_timeshift.c b/src/input/es_out_timeshift.c
index ed79000f65..bfdb930981 100644
--- a/src/input/es_out_timeshift.c
+++ b/src/input/es_out_timeshift.c
@@ -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 )
diff --git a/src/input/input.c b/src/input/input.c
index 2dd0bf0982..bb57eb4705 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -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));
 }
 
diff --git a/src/input/item.c b/src/input/item.c
index 1a8a2bdb3f..1c03af739b 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -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 );
 }
 
diff --git a/src/input/resource.c b/src/input/resource.c
index 0d192f2beb..65906da287 100644
--- a/src/input/resource.c
+++ b/src/input/resource.c
@@ -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 );
 }
diff --git a/src/input/stats.c b/src/input/stats.c
index 4a79ddc840..b294a59e98 100644
--- a/src/input/stats.c
+++ b/src/input/stats.c
@@ -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);
 }
 
diff --git a/src/input/thumbnailer.c b/src/input/thumbnailer.c
index dbf23b5115..783eb2886b 100644
--- a/src/input/thumbnailer.c
+++ b/src/input/thumbnailer.c
@@ -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 );
 }
 
diff --git a/src/input/vlm.c b/src/input/vlm.c
index c63217c295..d33b9a917a 100644
--- a/src/input/vlm.c
+++ b/src/input/vlm.c
@@ -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);
 }
 
diff --git a/src/interface/dialog.c b/src/interface/dialog.c
index 4205d88be4..c761bd0c4d 100644
--- a/src/interface/dialog.c
+++ b/src/interface/dialog.c
@@ -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;
 }
diff --git a/src/libvlc.c b/src/libvlc.c
index 2d370deab8..c40fa19ba3 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -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);
 }
 
diff --git a/src/libvlc.h b/src/libvlc.h
index e91587f947..d2d112aa56 100644
--- a/src/libvlc.h
+++ b/src/libvlc.h
@@ -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
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index a0efbecb78..1a7d4805c9 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -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
diff --git a/src/media_source/media_source.c b/src/media_source/media_source.c
index f6ac776ae2..71b37d41ac 100644
--- a/src/media_source/media_source.c
+++ b/src/media_source/media_source.c
@@ -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);
 }
 
diff --git a/src/media_source/media_tree.c b/src/media_source/media_tree.c
index 017325719f..5774b294ff 100644
--- a/src/media_source/media_tree.c
+++ b/src/media_source/media_tree.c
@@ -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);
 }
 
diff --git a/src/misc/addons.c b/src/misc/addons.c
index 1e19943037..a7a3414ddf 100644
--- a/src/misc/addons.c
+++ b/src/misc/addons.c
@@ -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 );
 
diff --git a/src/misc/background_worker.c b/src/misc/background_worker.c
index 04014354e9..4bba9e0ff3 100644
--- a/src/misc/background_worker.c
+++ b/src/misc/background_worker.c
@@ -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);
 }
 
diff --git a/src/misc/events.c b/src/misc/events.c
index 150f7272bc..e5472773ed 100644
--- a/src/misc/events.c
+++ b/src/misc/events.c
@@ -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;
diff --git a/src/misc/exit.c b/src/misc/exit.c
index 27985a4afb..d6cb0ad407 100644
--- a/src/misc/exit.c
+++ b/src/misc/exit.c
@@ -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.
  */
diff --git a/src/misc/fifo.c b/src/misc/fifo.c
index e11aebdb87..836f29d90b 100644
--- a/src/misc/fifo.c
+++ b/src/misc/fifo.c
@@ -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 );
 }
 
diff --git a/src/misc/httpcookies.c b/src/misc/httpcookies.c
index f4c9682a9e..2049b1b62c 100644
--- a/src/misc/httpcookies.c
+++ b/src/misc/httpcookies.c
@@ -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 );
 }
diff --git a/src/misc/interrupt.c b/src/misc/interrupt.c
index d2a04a72b3..f272b6ebca 100644
--- a/src/misc/interrupt.c
+++ b/src/misc/interrupt.c
@@ -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)
diff --git a/src/misc/medialibrary.c b/src/misc/medialibrary.c
index b1ce7907f3..10013c7f20 100644
--- a/src/misc/medialibrary.c
+++ b/src/misc/medialibrary.c
@@ -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);
 }
 
diff --git a/src/misc/messages.c b/src/misc/messages.c
index 0872511389..898e4be56f 100644
--- a/src/misc/messages.c
+++ b/src/misc/messages.c
@@ -257,7 +257,6 @@ static void vlc_LogEarlyClose(void *d)
         free(log);
     }
 
-    vlc_mutex_destroy(&early->lock);
     free(early);
 }
 
diff --git a/src/misc/objects.c b/src/misc/objects.c
index f87edd9827..f7e68c4dc4 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -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);
 }
 
diff --git a/src/misc/picture_fifo.c b/src/misc/picture_fifo.c
index 72ad2f622f..bda20f5d8f 100644
--- a/src/misc/picture_fifo.c
+++ b/src/misc/picture_fifo.c
@@ -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);
 }
 
diff --git a/src/misc/picture_pool.c b/src/misc/picture_pool.c
index 0eb53516ad..9190af91c4 100644
--- a/src/misc/picture_pool.c
+++ b/src/misc/picture_pool.c
@@ -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);
 }
 
diff --git a/src/misc/threads.c b/src/misc/threads.c
index 58f2e42889..7bde716aeb 100644
--- a/src/misc/threads.c
+++ b/src/misc/threads.c
@@ -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)
diff --git a/src/misc/update.c b/src/misc/update.c
index f5d6dc4ebe..44a446d8d6 100644
--- a/src/misc/update.c
+++ b/src/misc/update.c
@@ -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 );
diff --git a/src/network/httpd.c b/src/network/httpd.c
index 2b56c178a1..177abcc710 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -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);
diff --git a/src/os2/thread.c b/src/os2/thread.c
index c30cdad210..d7d07f6a17 100644
--- a/src/os2/thread.c
+++ b/src/os2/thread.c
@@ -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();
 
diff --git a/src/player/player.c b/src/player/player.c
index 48c03905a4..6eedc71925 100644
--- a/src/player/player.c
+++ b/src/player/player.c
@@ -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);
 }
diff --git a/src/player/timer.c b/src/player/timer.c
index 56bbdc0ae7..1be28b22f0 100644
--- a/src/player/timer.c
+++ b/src/player/timer.c
@@ -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);
 }
diff --git a/src/posix/timer.c b/src/posix/timer.c
index 713a9133f5..f84f17cb9d 100644
--- a/src/posix/timer.c
+++ b/src/posix/timer.c
@@ -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);
 }
 
diff --git a/src/preparser/fetcher.c b/src/preparser/fetcher.c
index ac5c3eba21..5bb4aa1cef 100644
--- a/src/preparser/fetcher.c
+++ b/src/preparser/fetcher.c
@@ -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 );
 }
diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c
index 80daa2ae0e..239a81936d 100644
--- a/src/stream_output/stream_output.c
+++ b/src/stream_output/stream_output.c
@@ -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);
 }
diff --git a/src/test/timer.c b/src/test/timer.c
index 1162305fe2..6b40c30c47 100644
--- a/src/test/timer.c
+++ b/src/test/timer.c
@@ -108,7 +108,5 @@ int main (void)
 
     vlc_timer_destroy (data.timer);
     vlc_cond_destroy (&data.wait);
-    vlc_mutex_destroy (&data.lock);
-
     return 0;
 }
diff --git a/src/video_output/control.c b/src/video_output/control.c
index 616ea566cf..c14931070b 100644
--- a/src/video_output/control.c
+++ b/src/video_output/control.c
@@ -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);
 }
diff --git a/src/video_output/opengl.c b/src/video_output/opengl.c
index 9d207ac709..99ba7b29e7 100644
--- a/src/video_output/opengl.c
+++ b/src/video_output/opengl.c
@@ -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);
 }
diff --git a/src/video_output/snapshot.c b/src/video_output/snapshot.c
index 92b5886dc8..b18297cb1b 100644
--- a/src/video_output/snapshot.c
+++ b/src/video_output/snapshot.c
@@ -78,7 +78,6 @@ void vout_snapshot_Destroy(vout_snapshot_t *snap)
     }
 
     vlc_cond_destroy(&snap->wait);
-    vlc_mutex_destroy(&snap->lock);
     free(snap);
 }
 
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index edda78d731..229b010a96 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -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);
diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index 3efd76ff1d..2a4a79ad91 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -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);
diff --git a/src/video_output/window.c b/src/video_output/window.c
index 16ebf9ef5a..9c2df5c1e6 100644
--- a/src/video_output/window.c
+++ b/src/video_output/window.c
@@ -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);
 }
 



More information about the vlc-commits mailing list