Skip to content

Commit 87252c9

Browse files
Fixing crash on startup
1 parent 40a0c85 commit 87252c9

File tree

2 files changed

+0
-51
lines changed

2 files changed

+0
-51
lines changed

libobs/media-io/video-io.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -582,34 +582,6 @@ void video_output_stop(video_t *video)
582582
}
583583
}
584584

585-
// TODO: OLD version
586-
/*
587-
void video_output_stop(video_t *video)
588-
{
589-
void *thread_ret;
590-
591-
if (!video)
592-
return;
593-
594-
video = get_root(video);
595-
596-
if (!video->stop) {
597-
video->stop = true;
598-
os_sem_post(video->update_semaphore);
599-
pthread_join(video->thread, &thread_ret);
600-
601-
if (video == obs->data.main_canvas->mix->video) {
602-
// The graphics thread must end before mutexes are destroyed
603-
if (obs->video.thread_initialized) {
604-
pthread_join(obs->video.video_thread,
605-
&thread_ret);
606-
obs->video.thread_initialized = false;
607-
}
608-
}
609-
}
610-
}
611-
*/
612-
613585
bool video_output_stopped(video_t *video)
614586
{
615587
if (!video)

libobs/obs.c

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -797,35 +797,12 @@ static int obs_init_video()
797797
return OBS_VIDEO_SUCCESS;
798798
}
799799

800-
// TODO: remove this
801-
/*
802-
static void stop_video(void)
803-
{
804-
//if (obs->data.main_canvas->mix) {
805-
// video_output_stop(obs->data.main_canvas->mix->video);
806-
//}
807-
808-
pthread_mutex_lock(&obs->video.mixes_mutex);
809-
for (size_t i = 0, num = obs->video.mixes.num; i < num; i++)
810-
video_output_stop(obs->video.mixes.array[i]->video);
811-
pthread_mutex_unlock(&obs->video.mixes_mutex);
812-
}
813-
*/
814-
815800
static void stop_video(void)
816801
{
817802
pthread_mutex_lock(&obs->video.mixes_mutex);
818803
for (size_t i = 0, num = obs->video.mixes.num; i < num; i++)
819804
video_output_stop(obs->video.mixes.array[i]->video);
820805
pthread_mutex_unlock(&obs->video.mixes_mutex);
821-
822-
struct obs_core_video *video = &obs->video;
823-
void *thread_retval;
824-
825-
if (video->thread_initialized) {
826-
pthread_join(video->video_thread, &thread_retval);
827-
video->thread_initialized = false;
828-
}
829806
}
830807

831808
static void obs_free_render_textures(struct obs_core_video_mix *video)

0 commit comments

Comments
 (0)