From cfda3ba39dbc85ef5f02a88467c07bd73e479ed5 Mon Sep 17 00:00:00 2001 From: Johns Date: Sat, 23 Nov 2013 16:48:02 +0100 Subject: [PATCH] Fix bug: Option softhddevice.BlackPicture has no effect. --- ChangeLog | 5 +++++ softhddev.c | 1 + video.c | 12 +++++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a6e4255..f7679d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +User johns +Date: + + Fix bug: Option softhddevice.BlackPicture has no effect. + User Dr. Seltsam Date: Tue Nov 5 16:46:34 CET 2013 diff --git a/softhddev.c b/softhddev.c index ce032f5..2631df7 100644 --- a/softhddev.c +++ b/softhddev.c @@ -2483,6 +2483,7 @@ int SetPlayMode(int play_mode) VideoResetStart(MyVideoStream->HwDecoder); #ifdef DEBUG VideoSwitch = GetMsTicks(); + Debug(3, "video: new stream start\n"); #endif } } 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;