mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
wmr: Clean up camera debug last.
Make sure to stop the USB thread before destroying the debug sink as cancelling the transfers is not sufficient to guarantee there will be no final callback (or one in progress)
This commit is contained in:
parent
11525976fa
commit
96fb9ce34a
|
@ -489,12 +489,6 @@ wmr_camera_free(struct wmr_camera *cam)
|
|||
// Stop the camera.
|
||||
wmr_camera_stop(cam);
|
||||
|
||||
// Tidy the variable tracking.
|
||||
u_var_remove_root(cam);
|
||||
u_sink_debug_destroy(&cam->debug_sinks[0]);
|
||||
u_sink_debug_destroy(&cam->debug_sinks[1]);
|
||||
|
||||
|
||||
if (cam->ctx != NULL) {
|
||||
int i;
|
||||
|
||||
|
@ -516,6 +510,13 @@ wmr_camera_free(struct wmr_camera *cam)
|
|||
libusb_exit(cam->ctx);
|
||||
}
|
||||
|
||||
// Tidy the variable tracking.
|
||||
u_var_remove_root(cam);
|
||||
u_sink_debug_destroy(&cam->debug_sinks[0]);
|
||||
u_sink_debug_destroy(&cam->debug_sinks[1]);
|
||||
|
||||
|
||||
|
||||
free(cam);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue