Commit 8ecc8c6a authored by Felix Paul Kühne's avatar Felix Paul Kühne

iOS vout: retain view container as early as possible

parent 33f95b18
......@@ -236,6 +236,8 @@ static int Open(vlc_object_t *this)
if (unlikely(viewContainer == nil))
goto bailout;
[viewContainer retain];
@synchronized(viewContainer) {
if (unlikely(![viewContainer respondsToSelector:@selector(isKindOfClass:)]))
goto bailout;
......@@ -245,7 +247,7 @@ static int Open(vlc_object_t *this)
/* This will be released in Close(), on
* main thread, after we are done using it. */
sys->viewContainer = [viewContainer retain];
sys->viewContainer = viewContainer;
if (vd->fmt.i_chroma == VLC_CODEC_CVPX_OPAQUE) {
msg_Dbg(vd, "will use zero-copy rendering");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment