[vlc-commits] iOS vout: retain view container as early as possible

Felix Paul Kühne git at videolan.org
Sat Dec 26 20:17:47 CET 2015


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Dec 23 18:21:34 2015 +0100| [8ecc8c6ae61e90f6c0399ecee95ab7bfc8a66d1e] | committer: Felix Paul Kühne

iOS vout: retain view container as early as possible

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8ecc8c6ae61e90f6c0399ecee95ab7bfc8a66d1e
---

 modules/video_output/ios2.m |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/ios2.m b/modules/video_output/ios2.m
index ddf170d..f2413b8 100644
--- a/modules/video_output/ios2.m
+++ b/modules/video_output/ios2.m
@@ -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");



More information about the vlc-commits mailing list