From 8039e8ae041e0a53db31fc01365ebd3c3cd5d4e6 Mon Sep 17 00:00:00 2001 From: Johns Date: Thu, 19 Apr 2012 00:47:34 +0200 Subject: New audio filters next part. --- video.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'video.c') 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; + } } } -- cgit v1.2.3