From cfda3ba39dbc85ef5f02a88467c07bd73e479ed5 Mon Sep 17 00:00:00 2001 From: Johns Date: Sat, 23 Nov 2013 16:48:02 +0100 Subject: Fix bug: Option softhddevice.BlackPicture has no effect. --- video.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'video.c') diff --git a/video.c b/video.c index 6893963..91e74b4 100644 --- a/video.c +++ b/video.c @@ -4979,7 +4979,10 @@ static void VaapiSyncDecoder(VaapiDecoder * decoder) _("video: decoder buffer empty, " "duping frame (%d/%d) %d v-buf\n"), decoder->FramesDuped, decoder->FrameCounter, VideoGetBuffers(decoder->Stream)); - if (decoder->Closing < -300) { + // some time no new picture or black video configured + if (decoder->Closing < -300 || (VideoShowBlackPicture + && decoder->Closing)) { + // clear ring buffer to trigger black picture atomic_set(&decoder->SurfacesFilled, 0); } } @@ -8609,7 +8612,10 @@ static void VdpauSyncDecoder(VdpauDecoder * decoder) _("video: decoder buffer empty, " "duping frame (%d/%d) %d v-buf\n"), decoder->FramesDuped, decoder->FrameCounter, VideoGetBuffers(decoder->Stream)); - if (decoder->Closing < -300) { + // some time no new picture or black video configured + if (decoder->Closing < -300 || (VideoShowBlackPicture + && decoder->Closing)) { + // clear ring buffer to trigger black picture atomic_set(&decoder->SurfacesFilled, 0); } } @@ -8925,7 +8931,7 @@ static void VdpauDisplayHandlerThread(void) static void VdpauSetOutputPosition(VdpauDecoder * decoder, int x, int y, int width, int height) { - Debug(3, "video/vdapu: output %dx%d%+d%+d\n", width, height, x, y); + Debug(3, "video/vdpau: output %dx%d%+d%+d\n", width, height, x, y); decoder->VideoX = x; decoder->VideoY = y; -- cgit v1.2.3