summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <andreas.sturmlechner@gmail.com>2016-11-26 16:34:39 +0100
committerMichael Palimaka <kensington@gentoo.org>2016-11-27 05:00:09 +1100
commit6ffd3e6806dc84eabb4ca910038a4628304b8db2 (patch)
treea8b66e3496e5fe033d0e5d73278d2331b7439e9b /media-video/vlc/files
parentmedia-video/vlc: Fix build with Qt 5.7.0 (diff)
downloadgentoo-6ffd3e6806dc84eabb4ca910038a4628304b8db2.tar.gz
gentoo-6ffd3e6806dc84eabb4ca910038a4628304b8db2.tar.bz2
gentoo-6ffd3e6806dc84eabb4ca910038a4628304b8db2.zip
media-video/vlc: Drop USE=media-library, fix some ALSA issues
Upstream seems unwilling to fix it in 2.2 branch. Gentoo-bug: 594126, 592784 Package-Manager: portage-2.3.0
Diffstat (limited to 'media-video/vlc/files')
-rw-r--r--media-video/vlc/files/vlc-2.2.4-alsa-large-buffers.patch47
-rw-r--r--media-video/vlc/files/vlc-2.2.4-decoder-lock-scope.patch47
2 files changed, 94 insertions, 0 deletions
diff --git a/media-video/vlc/files/vlc-2.2.4-alsa-large-buffers.patch b/media-video/vlc/files/vlc-2.2.4-alsa-large-buffers.patch
new file mode 100644
index 000000000000..b5a9ff7267fb
--- /dev/null
+++ b/media-video/vlc/files/vlc-2.2.4-alsa-large-buffers.patch
@@ -0,0 +1,47 @@
+X-Git-Url: https://git.videolan.org/?p=vlc.git;a=blobdiff_plain;f=modules%2Faudio_output%2Falsa.c;h=4e9fd53592d048baa8b57f30df15ab5806139d07;hp=2d1f99e9cb743bca12c6bdf32cc84a92d07fda8b;hb=47f74a83c161173b0d15e95dab8ceb7c97de51b4;hpb=6ae2905ef7fbc7de3a3a4a1bdf8ad6df46ce570a
+
+diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c
+index 2d1f99e..4e9fd53 100644
+--- a/modules/audio_output/alsa.c
++++ b/modules/audio_output/alsa.c
+@@ -495,6 +495,15 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
+ }
+ sys->rate = fmt->i_rate;
+
++#if 1 /* work-around for period-long latency outputs (e.g. PulseAudio): */
++ param = AOUT_MIN_PREPARE_TIME;
++ val = snd_pcm_hw_params_set_period_time_near (pcm, hw, &param, NULL);
++ if (val)
++ {
++ msg_Err (aout, "cannot set period: %s", snd_strerror (val));
++ goto error;
++ }
++#endif
+ /* Set buffer size */
+ param = AOUT_MAX_ADVANCE_TIME;
+ val = snd_pcm_hw_params_set_buffer_time_near (pcm, hw, &param, NULL);
+@@ -503,14 +512,22 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
+ msg_Err (aout, "cannot set buffer duration: %s", snd_strerror (val));
+ goto error;
+ }
+-
+- param = AOUT_MIN_PREPARE_TIME;
++#if 0
++ val = snd_pcm_hw_params_get_buffer_time (hw, &param, NULL);
++ if (val)
++ {
++ msg_Warn (aout, "cannot get buffer time: %s", snd_strerror(val));
++ param = AOUT_MIN_PREPARE_TIME;
++ }
++ else
++ param /= 2;
+ val = snd_pcm_hw_params_set_period_time_near (pcm, hw, &param, NULL);
+ if (val)
+ {
+ msg_Err (aout, "cannot set period: %s", snd_strerror (val));
+ goto error;
+ }
++#endif
+
+ /* Commit hardware parameters */
+ val = snd_pcm_hw_params (pcm, hw);
diff --git a/media-video/vlc/files/vlc-2.2.4-decoder-lock-scope.patch b/media-video/vlc/files/vlc-2.2.4-decoder-lock-scope.patch
new file mode 100644
index 000000000000..51a2cdcb16da
--- /dev/null
+++ b/media-video/vlc/files/vlc-2.2.4-decoder-lock-scope.patch
@@ -0,0 +1,47 @@
+X-Git-Url: https://git.videolan.org/?p=vlc.git;a=blobdiff_plain;f=src%2Finput%2Fdecoder.c;h=fe3cd428c65c18bfbdadb55baf11521afdc2bfc7;hp=83aa5bf54e2c29ad93fae803117558e4fcd0f658;hb=6ae2905ef7fbc7de3a3a4a1bdf8ad6df46ce570a;hpb=5b2de76965ee8b1ab5e3257f8b6d71bbb4e9e3f9
+
+--- a/src/input/decoder.c
++++ b/src/input/decoder.c
+@@ -1162,7 +1162,10 @@
+ b_paused = p_owner->b_paused;
+
+ if (!p_audio)
++ {
++ vlc_mutex_unlock( &p_owner->lock );
+ break;
++ }
+
+ /* */
+ int i_rate = INPUT_RATE_DEFAULT;
+@@ -1180,6 +1183,9 @@
+
+ if( unlikely(p_owner->b_paused != b_paused) )
+ continue; /* race with input thread? retry... */
++
++ vlc_mutex_unlock( &p_owner->lock );
++
+ if( p_aout == NULL )
+ b_reject = true;
+
+@@ -1199,7 +1205,6 @@
+
+ break;
+ }
+- vlc_mutex_unlock( &p_owner->lock );
+ }
+
+ static void DecoderDecodeAudio( decoder_t *p_dec, block_t *p_block )
+@@ -1961,11 +1966,10 @@
+
+ /* Parameters changed, restart the aout */
+ vlc_mutex_lock( &p_owner->lock );
+-
+- aout_DecDelete( p_owner->p_aout );
+ p_owner->p_aout = NULL;
+-
+ vlc_mutex_unlock( &p_owner->lock );
++ aout_DecDelete( p_owner->p_aout );
++
+ input_resource_PutAout( p_owner->p_resource, p_aout );
+ }
+