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 */
|
/* Release D3D resources */
|
||||||
d3d_set_window_handle (sink, 0, FALSE);
|
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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2262,6 +2268,8 @@ d3d_create_internal_window (GstD3DVideoSink * sink)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sink->internal_window_thread = thread;
|
||||||
|
|
||||||
/* Wait 10 seconds for window proc loop to start up */
|
/* Wait 10 seconds for window proc loop to start up */
|
||||||
for (i = 0; dat.running == FALSE && i < intervals; i++) {
|
for (i = 0; dat.running == FALSE && i < intervals; i++) {
|
||||||
g_usleep (timeout_interval);
|
g_usleep (timeout_interval);
|
||||||
|
|
|
@ -60,6 +60,7 @@ struct _GstD3DVideoSink
|
||||||
GstVideoRectangle render_rect;
|
GstVideoRectangle render_rect;
|
||||||
|
|
||||||
GRecMutex lock;
|
GRecMutex lock;
|
||||||
|
GThread *internal_window_thread;
|
||||||
|
|
||||||
/* Properties */
|
/* Properties */
|
||||||
gboolean force_aspect_ratio;
|
gboolean force_aspect_ratio;
|
||||||
|
|
Loading…
Reference in a new issue