Skip to content
Snippets Groups Projects
Commit 79e1535a authored by Alexandre Janniaux's avatar Alexandre Janniaux Committed by Felix Paul Kühne
Browse files

caopengllayer: fix using layer outside of main thread

When stopping the playback, vout_display_t destructor will call the
[VideoView vlcClose] which references the backing CALayer through [self
layer]. This function is not thread-safe and should only be called from
the main thread, leading to reports and crashes when using the main
thread checker.

Instead, since we allocate the layer and references it from the
vout_display_t implementation, just send the vlcClose message on the
stored layer directly. Since it's only used to pass from the vd from the
view to the layer, and it's initialized from a dispatch_sync() in the
Open() function, there won't be race de-initializing them in a
non-synchronized fashion like done in this commit.

Fixes #27513
parent 678d0466
No related branches found
No related tags found
1 merge request!4974caopengllayer: fix using layer outside of main thread
Pipeline #440400 passed with warnings with stage
in 16 minutes and 47 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment