summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2010-02-27 11:27:29 +0000
committerphintuka <phintuka>2010-02-27 11:27:29 +0000
commitab6ec997e9203b6e568dd55e1a6664c4918de633 (patch)
tree5af17b01ad786a08509aedb8274f42ccf806df27
parent041b1f1bb70d8b7c51b7b1e419df4172cce4da70 (diff)
downloadxineliboutput-ab6ec997e9203b6e568dd55e1a6664c4918de633.tar.gz
xineliboutput-ab6ec997e9203b6e568dd55e1a6664c4918de633.tar.bz2
set_trick_speed():
- reset still mode - do not use backwards flag if playing slave stream
-rw-r--r--xine_input_vdr.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/xine_input_vdr.c b/xine_input_vdr.c
index 382f8d8f..99d957f0 100644
--- a/xine_input_vdr.c
+++ b/xine_input_vdr.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_input_vdr.c,v 1.303 2010-02-27 11:22:10 phintuka Exp $
+ * $Id: xine_input_vdr.c,v 1.304 2010-02-27 11:27:29 phintuka Exp $
*
*/
@@ -136,7 +136,7 @@ typedef struct {
# include <linux/unistd.h> /* syscall(__NR_gettid) */
#endif
-static const char module_revision[] = "$Id: xine_input_vdr.c,v 1.303 2010-02-27 11:22:10 phintuka Exp $";
+static const char module_revision[] = "$Id: xine_input_vdr.c,v 1.304 2010-02-27 11:27:29 phintuka Exp $";
static const char log_module_input_vdr[] = "[input_vdr] ";
#define LOG_MODULENAME log_module_input_vdr
#define SysLogLevel iSysLogLevel
@@ -1977,15 +1977,19 @@ static int set_trick_speed(vdr_input_plugin_t *this, int speed, int backwards)
* no audio
1 - normal
*/
- pthread_mutex_lock(&this->lock);
- this->is_paused = 0;
- if(speed == 0) {
- this->is_paused = 1;
- } else if(speed>64 || speed<-64) {
- pthread_mutex_unlock(&this->lock);
+
+ if (speed > 64 || speed < -64)
return -2;
- }
+ pthread_mutex_lock(&this->lock);
+
+ this->is_paused = !!(speed == 0);
+
+ if (!this->is_paused)
+ set_still_mode(this, 0);
+
+ if (this->slave_stream)
+ backwards = 0;
this->metronom->set_trickspeed(this->metronom, backwards ? speed : 0);
if(speed > 1 || speed < -1) {