summaryrefslogtreecommitdiff
path: root/softhddev.c
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-05-16 20:35:35 +0200
committerJohns <johns98@gmx.net>2012-05-16 20:35:35 +0200
commitc112b850d82055c7b661168eccc1bec435030392 (patch)
tree16cac07c99321518bd4508c23fb617dfb95d7338 /softhddev.c
parent752ee356fa599ba9ede80385ab08ac7c75b127eb (diff)
downloadvdr-plugin-softhddevice-c112b850d82055c7b661168eccc1bec435030392.tar.gz
vdr-plugin-softhddevice-c112b850d82055c7b661168eccc1bec435030392.tar.bz2
Fix bug: 100% cpu use.
Fix bug: audio/video out of sync after jump in recordings.
Diffstat (limited to 'softhddev.c')
-rw-r--r--softhddev.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/softhddev.c b/softhddev.c
index d5426f9..1c041d4 100644
--- a/softhddev.c
+++ b/softhddev.c
@@ -1451,7 +1451,10 @@ int VideoPollInput(void)
VideoClearBuffers = 0;
return 1;
}
- return 0;
+ if (!atomic_read(&VideoPacketsFilled)) {
+ return -1;
+ }
+ return 1;
}
/**
@@ -1468,9 +1471,6 @@ int VideoDecodeInput(void)
int saved_size;
static int last_codec_id = CODEC_ID_NONE;
- if (StreamFreezed) { // stream freezed
- return 1;
- }
if (VideoClearBuffers) {
atomic_set(&VideoPacketsFilled, 0);
VideoPacketRead = VideoPacketWrite;
@@ -1481,6 +1481,10 @@ int VideoDecodeInput(void)
VideoClearBuffers = 0;
return 1;
}
+ if (StreamFreezed) { // stream freezed
+ // clear is called during freezed
+ return 1;
+ }
filled = atomic_read(&VideoPacketsFilled);
if (!filled) {
@@ -2029,7 +2033,8 @@ void Clear(void)
int i;
VideoResetPacket(); // terminate work
- VideoSetClosing(MyHwDecoder);
+ //closing not reset:
+ //VideoSetClosing(MyHwDecoder);
VideoResetStart(MyHwDecoder);
VideoClearBuffers = 1;
AudioFlushBuffers();