[vlc-commits] [Git][videolan/vlc][master] 4 commits: avcapture: remove unused pts variable

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Jan 14 08:16:05 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
ed50eb4d by Alexandre Janniaux at 2023-01-14T07:57:36+00:00
avcapture: remove unused pts variable

- - - - -
71a565db by Alexandre Janniaux at 2023-01-14T07:57:36+00:00
avcapture: initialize pixels to NULL

If we cannot open the buffer from the CMSampleBuffer, pixels should be
NULL so that we fail correctly at the end of the function.

- - - - -
523efb67 by Alexandre Janniaux at 2023-01-14T07:57:36+00:00
avcapture: discard unused warning

We need to transfer ownership during close but we have nothing to do
after that since the deallocation process is handled by RAII.

- - - - -
c619786b by Alexandre Janniaux at 2023-01-14T07:57:36+00:00
access: avcapture: remove unused variables

- - - - -


1 changed file:

- modules/access/avcapture.m


Changes:

=====================================
modules/access/avcapture.m
=====================================
@@ -209,9 +209,7 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
 - (vlc_tick_t)copyCurrentFrameToBuffer:(void *)buffer
 {
     CVImageBufferRef imageBuffer;
-    vlc_tick_t pts;
-
-    void *pixels;
+    void *pixels = NULL;
 
     if ( !currentImageBuffer || currentPts == previousPts )
         return 0;
@@ -221,7 +219,7 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
         imageBuffer = CVBufferRetain(currentImageBuffer);
         if (imageBuffer)
         {
-            pts = previousPts = currentPts;
+            previousPts = currentPts;
             CVPixelBufferLockBaseAddress(imageBuffer, 0);
             pixels = CVPixelBufferGetBaseAddress(imageBuffer);
             if (pixels)
@@ -294,7 +292,7 @@ static void Close(vlc_object_t *p_this)
 
     /* Signal ARC we won't use those references anymore. */
     p_demux->p_sys = nil;
-    demux = nil;
+    (void)demux;
 }
 
 /*****************************************************************************
@@ -349,7 +347,7 @@ static int Control(demux_t *p_demux, int i_query, va_list args)
 
     AVCaptureDeviceInput    *input = nil;
 
-    int                     i, i_width, i_height, deviceCount, ivideo;
+    int                     deviceCount, ivideo;
 
     char                    *psz_uid = NULL;
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/bb9479813439f7247c03513e84378e565d422c16...c619786bc21bbf2dbdc2be707953b2a33d161a0e

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/bb9479813439f7247c03513e84378e565d422c16...c619786bc21bbf2dbdc2be707953b2a33d161a0e
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list