* Tue Feb 17 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.1.16.2-2
- xine-lib-safe-audio-pause3 patch (kdebug#180339)
This commit is contained in:
parent
04cb6e4393
commit
866427bb60
@ -1,6 +1,14 @@
|
||||
diff -r ce4b1533a0af src/xine-engine/audio_out.c
|
||||
--- a/src/xine-engine/audio_out.c Sun Jan 11 22:24:42 2009 +0000
|
||||
+++ b/src/xine-engine/audio_out.c Sat Feb 07 15:09:24 2009 -0200
|
||||
# HG changeset patch
|
||||
# User Miguel Freitas <miguelfreitas@users.sourceforge.net>
|
||||
# Date 1234834587 10800
|
||||
# Node ID 2208e465026c1e54318d36dad8ca180d52fcc318
|
||||
# Parent 24a9b3d531419405f71dbcf96da93876769eb990
|
||||
Protect audio loop so it cannot write to a paused device (fix
|
||||
pause/resume freeze with pulseaudio).
|
||||
|
||||
diff -r 24a9b3d53141 -r 2208e465026c src/xine-engine/audio_out.c
|
||||
--- a/src/xine-engine/audio_out.c Fri Feb 13 18:01:29 2009 +0000
|
||||
+++ b/src/xine-engine/audio_out.c Mon Feb 16 22:36:27 2009 -0300
|
||||
@@ -243,6 +243,7 @@
|
||||
audio_fifo_t *free_fifo;
|
||||
audio_fifo_t *out_fifo;
|
||||
@ -49,23 +57,25 @@ diff -r ce4b1533a0af src/xine-engine/audio_out.c
|
||||
pthread_mutex_destroy(&this->flush_audio_driver_lock);
|
||||
pthread_cond_destroy(&this->flush_audio_driver_reached);
|
||||
|
||||
@@ -1910,11 +1916,15 @@
|
||||
@@ -1910,8 +1916,15 @@
|
||||
if (value != XINE_FINE_SPEED_NORMAL && value != XINE_SPEED_PAUSE && !this->slow_fast_audio )
|
||||
this->ao.control(&this->ao, AO_CTRL_FLUSH_BUFFERS, NULL);
|
||||
|
||||
+ /* current_speed_lock is here to make sure the ao_loop will pause in a safe place.
|
||||
+ * that is, we cannot pause writing to device, filling gaps etc. */
|
||||
+ pthread_mutex_lock(&this->current_speed_lock);
|
||||
this->ao.control(&this->ao,
|
||||
(value == XINE_SPEED_PAUSE) ? AO_CTRL_PLAY_PAUSE : AO_CTRL_PLAY_RESUME, NULL);
|
||||
- this->ao.control(&this->ao,
|
||||
- (value == XINE_SPEED_PAUSE) ? AO_CTRL_PLAY_PAUSE : AO_CTRL_PLAY_RESUME, NULL);
|
||||
+ if( value == XINE_SPEED_PAUSE ) {
|
||||
+ /* current_speed_lock is here to make sure the ao_loop will pause in a safe place.
|
||||
+ * that is, we cannot pause writing to device, filling gaps etc. */
|
||||
+ pthread_mutex_lock(&this->current_speed_lock);
|
||||
+ this->ao.control(&this->ao, AO_CTRL_PLAY_PAUSE, NULL);
|
||||
+ pthread_mutex_unlock(&this->current_speed_lock);
|
||||
+ } else {
|
||||
+ this->ao.control(&this->ao, AO_CTRL_PLAY_RESUME, NULL);
|
||||
+ }
|
||||
this->current_speed = value;
|
||||
if( this->slow_fast_audio )
|
||||
ao_update_resample_factor(this);
|
||||
+ pthread_mutex_unlock(&this->current_speed_lock);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -2056,6 +2066,7 @@
|
||||
@@ -2056,6 +2069,7 @@
|
||||
this->driver = driver;
|
||||
this->xine = xine;
|
||||
this->clock = xine->clock;
|
||||
@ -73,7 +83,7 @@ diff -r ce4b1533a0af src/xine-engine/audio_out.c
|
||||
this->streams = xine_list_new();
|
||||
|
||||
/* warning: driver_lock is a recursive mutex. it must NOT be
|
||||
@@ -2087,6 +2098,7 @@
|
||||
@@ -2087,6 +2101,7 @@
|
||||
this->discard_buffers = 0;
|
||||
this->zero_space = calloc (1, ZERO_BUF_SIZE * 4 * 6); /* MAX as 32bit, 6 channels. */
|
||||
|
||||
@ -81,9 +91,9 @@ diff -r ce4b1533a0af src/xine-engine/audio_out.c
|
||||
pthread_mutex_init( &this->flush_audio_driver_lock, NULL );
|
||||
pthread_cond_init( &this->flush_audio_driver_reached, NULL );
|
||||
|
||||
diff -r ce4b1533a0af src/xine-engine/xine.c
|
||||
--- a/src/xine-engine/xine.c Sun Jan 11 22:24:42 2009 +0000
|
||||
+++ b/src/xine-engine/xine.c Sat Feb 07 15:09:25 2009 -0200
|
||||
diff -r 24a9b3d53141 -r 2208e465026c src/xine-engine/xine.c
|
||||
--- a/src/xine-engine/xine.c Fri Feb 13 18:01:29 2009 +0000
|
||||
+++ b/src/xine-engine/xine.c Mon Feb 16 22:36:27 2009 -0300
|
||||
@@ -330,17 +330,20 @@
|
||||
|
||||
static void set_speed_internal (xine_stream_t *stream, int speed) {
|
||||
@ -114,7 +124,7 @@ diff -r ce4b1533a0af src/xine-engine/xine.c
|
||||
xine->port_ticket->release(xine->port_ticket, 1);
|
||||
}
|
||||
+
|
||||
+ if (old_speed == XINE_SPEED_PAUSE && speed != XINE_SPEED_PAUSE)
|
||||
+ if (old_speed == XINE_SPEED_PAUSE || speed != XINE_SPEED_PAUSE)
|
||||
+ /* master clock is set after resuming the audio device (audio_out loop may continue) */
|
||||
+ stream->xine->clock->set_fine_speed (stream->xine->clock, speed);
|
||||
}
|
@ -34,7 +34,7 @@
|
||||
Summary: A multimedia engine
|
||||
Name: xine-lib
|
||||
Version: 1.1.16.2
|
||||
Release: 1%{?dist}.1
|
||||
Release: 2%{?dist}
|
||||
License: GPLv2+
|
||||
Group: System Environment/Libraries
|
||||
URL: http://xinehq.de/
|
||||
@ -54,7 +54,7 @@ Patch7: %{name}-1.1.16-old-caca.patch
|
||||
# http://bugzilla.redhat.com/470568
|
||||
Patch8: xine-lib-1.1.15-avsync_hack.patch
|
||||
## upstream patches
|
||||
Patch100: xine-lib-safe-audio-pause.patch
|
||||
Patch100: xine-lib-safe-audio-pause3.patch
|
||||
|
||||
Provides: xine-lib(plugin-abi) = %{abiver}
|
||||
%if "%{?_isa}" != "%{nil}"
|
||||
@ -439,6 +439,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Feb 17 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.1.16.2-2
|
||||
- xine-lib-safe-audio-pause3 patch (kdebug#180339)
|
||||
|
||||
* Tue Feb 10 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1.1.16.2-1.1
|
||||
- also patch the caca version check in configure(.ac)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user