diff --git a/compile.sh b/compile.sh
index 484fb3984b40d02d2e86dc21c6853dcc851e82d4..aa21d1e6813d2137b3c74c8b1d09f5f85abde785 100755
--- a/compile.sh
+++ b/compile.sh
@@ -27,10 +27,16 @@ fi
 
 cd $WORK_DIR
 
+TESTED_HASH="1a55c0b9"
+
 # Go go go vlc
 if [ ! -d vlc ]; then
     diagnostic "VLC source not found, cloning"
-    git clone http://git.videolan.org/git/vlc.git vlc
+    git clone http://git.videolan.org/git/vlc.git vlc || checkfail "VLC source: git clone failed"
+    cd vlc
+    diagnostic "VLC source: resetting to the TESTED_HASH commit (${TESTED_HASH})"
+    git reset --hard ${TESTED_HASH} || checkfail "VLC source: TESTED_HASH ${TESTED_HASH} not found"
+    cd ..
     checkfail "vlc source: git clone failed"
 fi
 
@@ -88,6 +94,7 @@ if [ -d ../vlc_patches ] && [ "$(ls -A ../vlc_patches)" ]; then
     git am -3 ../vlc_patches/0014-vout-add-emscripten-gl-es2-and-window-modules.patch
     git am -3 ../vlc_patches/0015-vlc_common-add-weak-attribute-support-for-wasm.patch
     git am -3 ../vlc_patches/0016-Add-meson_system_name-for-emscripten.patch
+    git am -3 ../vlc_patches/0017-es_out-use-sout-control-only-when-sout-is-enabled.patch
     
     # Add OPENAL support
     git am -3 ../vlc_patches/openal/*
diff --git a/vlc_patches/0017-es_out-use-sout-control-only-when-sout-is-enabled.patch b/vlc_patches/0017-es_out-use-sout-control-only-when-sout-is-enabled.patch
new file mode 100644
index 0000000000000000000000000000000000000000..2b075f0d364c85b5a9f73ee457ffaf348a7f625b
--- /dev/null
+++ b/vlc_patches/0017-es_out-use-sout-control-only-when-sout-is-enabled.patch
@@ -0,0 +1,37 @@
+From patchwork Mon Mar  9 23:12:16 2020
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: es_out: use sout control only when sout is enabled
+From: Alexandre Janniaux <ajanni@videolabs.io>
+X-Patchwork-Id: 26662
+Message-Id: <20200309231216.132003-1-ajanni@videolabs.io>
+To: vlc-devel@videolan.org
+Date: Tue, 10 Mar 2020 00:12:16 +0100
+
+sout_instance_ControlsPace implementation is only compiled when
+ENABLE_SOUT is defined, so es_out should only use it in that case.
+---
+ src/input/es_out.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/input/es_out.c b/src/input/es_out.c
+index 118c780c95..e4e0e460ac 100644
+--- a/src/input/es_out.c
++++ b/src/input/es_out.c
+@@ -2752,6 +2752,7 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
+         return VLC_SUCCESS;
+     }
+ 
++#ifdef ENABLE_SOUT
+     /* Check for sout mode */
+     if( input_priv(p_input)->p_sout )
+     {
+@@ -2762,6 +2763,7 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
+ 
+         input_priv(p_input)->b_out_pace_control = pace;
+     }
++#endif
+ 
+     /* Decode */
+     if( es->p_dec_record )