summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();