From 1f03f8e2569e69e558d077643ea628d3ba3cacb7 Mon Sep 17 00:00:00 2001 From: Vincent Cheah Beng Keat Date: Thu, 25 May 2023 01:16:18 +0800 Subject: [PATCH 5/5] Fix sample_multi_transcode intermittent segfault HSD ID: 15012772965 Tested command: ./sample_multi_transcode -par config.par Upstream-Status: Backport Expect it to be removed once move to v2023.3.0 and above. https://github.com/oneapi-src/oneVPL/commit/c21756e6a235fbde08844cca5e429ca142eef479 --- tools/legacy/sample_misc/wayland/src/class_wayland.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp index af4d3f3..e86ceee 100644 --- a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp +++ b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp @@ -152,8 +152,10 @@ void Wayland::FreeSurface() { while (!m_buffers_list.empty()) { wl_surface_attach(m_surface, NULL, 0, 0); wl_surface_commit(m_surface); - if (wl_display_dispatch_queue(m_display, m_event_queue) < 1) + if (wl_display_dispatch_queue(m_display, m_event_queue) < 1) { + DestroyBufferList(); break; + } } wl_surface_destroy(m_surface); -- 2.40.1