Fix infinite loop in v4l2 plugin.

When initialization of the device fails the plugin may hang
trying to join a non-existing pthread.
master
fryshorts 2014-08-11 23:27:46 +02:00
parent 71200051b0
commit d73d2b22f8
1 changed files with 1 additions and 0 deletions

View File

@ -552,6 +552,7 @@ static void v4l2_terminate(struct v4l2_data *data)
os_event_signal(data->event);
pthread_join(data->thread, NULL);
os_event_destroy(data->event);
data->thread = 0;
}
v4l2_destroy_mmap(&data->buffers);