summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2009-01-25 11:39:43 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2009-01-25 11:39:43 +0100
commitf9c1974f2de4b749ffc698f72331530c3adc65ea (patch)
tree93e3291a0979bcb7dc32703d153b0c183a29837f /device.c
parent73be47a4b1dc1b5f2628ea9b9aeb5d161363d981 (diff)
downloadvdr-f9c1974f2de4b749ffc698f72331530c3adc65ea.tar.gz
vdr-f9c1974f2de4b749ffc698f72331530c3adc65ea.tar.bz2
Improved fast-forward/-rewind for audio recordings
Diffstat (limited to 'device.c')
-rw-r--r--device.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/device.c b/device.c
index 23c0870a..1f806e02 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 2.10 2009/01/24 13:40:54 kls Exp $
+ * $Id: device.c 2.11 2009/01/25 11:10:56 kls Exp $
*/
#include "device.h"
@@ -81,6 +81,7 @@ cDevice::cDevice(void)
startScrambleDetection = 0;
player = NULL;
+ isPlayingVideo = false;
ClrAvailableTracks();
currentAudioTrack = ttNone;
currentAudioTrackMissingCount = 0;
@@ -1099,6 +1100,7 @@ void cDevice::Detach(cPlayer *Player)
SetVideoDisplayFormat(eVideoDisplayFormat(Setup.VideoDisplayFormat));
PlayTs(NULL, 0);
Audios.ClearAudio();
+ isPlayingVideo = false;
}
}
@@ -1151,6 +1153,7 @@ int cDevice::PlayPesPacket(const uchar *Data, int Length, bool VideoOnly)
switch (c) {
case 0xBE: // padding stream, needed for MPEG1
case 0xE0 ... 0xEF: // video
+ isPlayingVideo = true;
w = PlayVideo(Start, d);
break;
case 0xC0 ... 0xDF: // audio
@@ -1322,8 +1325,10 @@ int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly)
patPmtParser.ParsePat(Data, Length);
else if (Pid == patPmtParser.PmtPid())
patPmtParser.ParsePmt(Data, Length);
- else if (Pid == patPmtParser.Vpid())
+ else if (Pid == patPmtParser.Vpid()) {
+ isPlayingVideo = true;
return PlayTsVideo(Data, Length);
+ }
else if (Pid == availableTracks[currentAudioTrack].id) {
if (!VideoOnly || HasIBPTrickSpeed()) {
int w = PlayTsAudio(Data, Length);