summaryrefslogtreecommitdiff
path: root/video.c
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-04-19 00:47:34 +0200
committerJohns <johns98@gmx.net>2012-04-19 00:47:34 +0200
commit8039e8ae041e0a53db31fc01365ebd3c3cd5d4e6 (patch)
treee0d85dfbce7cf65a542aeef09db34e02b5b188b3 /video.c
parent79e78bf235b9e15b058ec02da5926c6d6577300b (diff)
downloadvdr-plugin-softhddevice-8039e8ae041e0a53db31fc01365ebd3c3cd5d4e6.tar.gz
vdr-plugin-softhddevice-8039e8ae041e0a53db31fc01365ebd3c3cd5d4e6.tar.bz2
New audio filters next part.
Diffstat (limited to 'video.c')
-rw-r--r--video.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/video.c b/video.c
index 76be58e..911272a 100644
--- a/video.c
+++ b/video.c
@@ -4508,7 +4508,7 @@ static void VaapiSyncDecoder(VaapiDecoder * decoder)
_("video: decoder buffer empty, "
"duping frame (%d/%d) %d v-buf\n"), decoder->FramesDuped,
decoder->FrameCounter, VideoGetBuffers());
- if (decoder->Closing == -1) {
+ if (decoder->Closing < -300) {
atomic_set(&decoder->SurfacesFilled, 0);
}
}
@@ -4670,9 +4670,12 @@ static void VaapiDisplayHandlerThread(void)
if (err) {
// FIXME: sleep on wakeup
usleep(5 * 1000); // nothing buffered
- if (err == -1 && decoder->Closing > 0) {
- Debug(3, "video/vaapi: closing eof\n");
- decoder->Closing = -1;
+ if (err == -1 && decoder->Closing) {
+ decoder->Closing--;
+ if (!decoder->Closing) {
+ Debug(3, "video/vaapi: closing eof\n");
+ decoder->Closing = -1;
+ }
}
}
@@ -7726,7 +7729,7 @@ static void VdpauSyncDecoder(VdpauDecoder * decoder)
_("video: decoder buffer empty, "
"duping frame (%d/%d) %d v-buf\n"), decoder->FramesDuped,
decoder->FrameCounter, VideoGetBuffers());
- if (decoder->Closing == -1) {
+ if (decoder->Closing < -300) {
atomic_set(&decoder->SurfacesFilled, 0);
}
}
@@ -7966,9 +7969,12 @@ static void VdpauDisplayHandlerThread(void)
if (err) {
// FIXME: sleep on wakeup
usleep(5 * 1000); // nothing buffered
- if (err == -1 && decoder->Closing > 0) {
- Debug(3, "video/vdpau: closing eof\n");
- decoder->Closing = -1;
+ if (err == -1 && decoder->Closing) {
+ decoder->Closing--;
+ if (!decoder->Closing) {
+ Debug(3, "video/vdpau: closing eof\n");
+ decoder->Closing = -1;
+ }
}
}