[Libva] [PATCH 3/6] Fix infinite loop
Lim Siew Hoon
siew.hoon.lim at intel.com
Fri Jul 1 05:29:10 UTC 2016
Signed-off-by: Lim Siew Hoon <siew.hoon.lim at intel.com>
---
test/putsurface/putsurface_wayland.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/test/putsurface/putsurface_wayland.c b/test/putsurface/putsurface_wayland.c
index 67da475..ad3c4e6 100644
--- a/test/putsurface/putsurface_wayland.c
+++ b/test/putsurface/putsurface_wayland.c
@@ -142,6 +142,7 @@ va_put_surface(
struct wl_callback *callback;
VAStatus va_status;
struct wl_buffer *buffer;
+ int ret = 0;
if (!wl_drawable)
return VA_STATUS_ERROR_INVALID_SURFACE;
@@ -153,8 +154,8 @@ va_put_surface(
/* Wait for the previous frame to complete redraw */
if (wl_drawable->redraw_pending) {
wl_display_flush(d->display);
- while (wl_drawable->redraw_pending)
- wl_display_dispatch(wl_drawable->display);
+ while (wl_drawable->redraw_pending && ret >=0)
+ ret = wl_display_dispatch(wl_drawable->display);
}
va_status = vaGetSurfaceBufferWl(va_dpy, va_surface, VA_FRAME_PICTURE, &buffer);
--
2.1.0
More information about the Libva
mailing list