diff --git a/ChangeLog b/ChangeLog index 71ad8de..d34ba7e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ User johns Date: + Fix bug: VDPAU looses preemption callback. Fix bug: X11 server keeps sending USR1 signals, which confuses suspend. Show message for hot-keys. Fix bug: playback errors with old PES recordings. diff --git a/video.c b/video.c index 9433c9c..7798e82 100644 --- a/video.c +++ b/video.c @@ -6291,6 +6291,8 @@ static int VdpauInit(const char *display_name) } // FIXME: does only check for rgba formats, but no action + // FIXME: what if preemption happens during setup? + // // Create presentation queue, only one queue pro window // @@ -7830,10 +7832,6 @@ static int VdpauPreemptionRecover(void) VdpStatus status; int i; - VdpauPreemption = 0; - - Debug(3, "video/vdpau: display preempted\n"); - status = vdp_device_create_x11(XlibDisplay, DefaultScreen(XlibDisplay), &VdpauDevice, &VdpauGetProcAddress); @@ -7841,6 +7839,17 @@ static int VdpauPreemptionRecover(void) VdpauPreemption = 1; return -1; } + // VDPAU seems to loose the callback during preemption + status = + VdpauPreemptionCallbackRegister(VdpauDevice, VdpauPreemptionCallback, + NULL); + if (status != VDP_STATUS_OK) { + Error(_("video/vdpau: can't register preemption callback: %s\n"), + VdpauGetErrorString(status)); + } + + VdpauPreemption = 0; + Debug(3, "video/vdpau: display preemption recovery\n"); VdpauInitOutputQueue(); @@ -7862,8 +7871,8 @@ static int VdpauPreemptionRecover(void) VdpauOsdBitmapSurface[i] = VDP_INVALID_HANDLE; #else VdpauOsdOutputSurface[i] = VDP_INVALID_HANDLE; - } #endif + } VdpauOsdInit(OsdWidth, OsdHeight); @@ -7909,6 +7918,7 @@ static void VdpauDisplayHandlerThread(void) VdpauDecoder *decoder; if (!(decoder = VdpauDecoders[0])) { // no stream available + usleep(15 * 1000); return; }