mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
d3dvideosink: Don't leak GThread object
Need to call g_thread_join() to avoid leak
This commit is contained in:
parent
c9b204ea87
commit
b3279c3fce
2 changed files with 9 additions and 0 deletions
|
@ -1208,6 +1208,12 @@ d3d_stop (GstD3DVideoSink * sink)
|
|||
|
||||
/* Release D3D resources */
|
||||
d3d_set_window_handle (sink, 0, FALSE);
|
||||
|
||||
if (sink->internal_window_thread) {
|
||||
g_thread_join (sink->internal_window_thread);
|
||||
sink->internal_window_thread = NULL;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -2262,6 +2268,8 @@ d3d_create_internal_window (GstD3DVideoSink * sink)
|
|||
return 0;
|
||||
}
|
||||
|
||||
sink->internal_window_thread = thread;
|
||||
|
||||
/* Wait 10 seconds for window proc loop to start up */
|
||||
for (i = 0; dat.running == FALSE && i < intervals; i++) {
|
||||
g_usleep (timeout_interval);
|
||||
|
|
|
@ -60,6 +60,7 @@ struct _GstD3DVideoSink
|
|||
GstVideoRectangle render_rect;
|
||||
|
||||
GRecMutex lock;
|
||||
GThread *internal_window_thread;
|
||||
|
||||
/* Properties */
|
||||
gboolean force_aspect_ratio;
|
||||
|
|
Loading…
Reference in a new issue