summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/onevpl/files/0005-Fix-sample_multi_transcode-intermittent-segfault.patch
blob: 52f8fb7ed79ffa6d3bf36e9ba4de5fa2a559c0ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 1f03f8e2569e69e558d077643ea628d3ba3cacb7 Mon Sep 17 00:00:00 2001
From: Vincent Cheah Beng Keat <vincent.beng.keat.cheah@intel.com>
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