[vlc-commits] [Git][videolan/vlc][master] 6 commits: transcode: remove tautology

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Wed Jan 11 14:52:49 UTC 2023



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
451c95a9 by Alexandre Janniaux at 2023-01-11T14:35:06+00:00
transcode: remove tautology

`for ( block_t *it = p_out; it != NULL; )` will already check that
`p_out` is NULL at the first loop run.

- - - - -
44a60490 by Alexandre Janniaux at 2023-01-11T14:35:06+00:00
access: meson.build: add missing -fobjc-arc

avcapture required -fobjc-arc but it was missing.

- - - - -
e759c0ec by Alexandre Janniaux at 2023-01-11T14:35:06+00:00
video_filter: ci_filters: remove unused variables

- - - - -
73996454 by Alexandre Janniaux at 2023-01-11T14:35:06+00:00
qt: roundimage: fix missing return

- - - - -
7f552ee0 by Alexandre Janniaux at 2023-01-11T14:35:06+00:00
services_discovery: bonjour: fix uninitialized variable

- - - - -
836be4e3 by Alexandre Janniaux at 2023-01-11T14:35:06+00:00
gui: macosx: remove WindowClose forward declaration

The function was removed in ce002c9f2c6a287cae610c330679efbeaad58e6e.

- - - - -


6 changed files:

- modules/access/meson.build
- modules/gui/minimal_macosx/intf.m
- modules/gui/qt/widgets/native/roundimage.cpp
- modules/services_discovery/bonjour.m
- modules/stream_out/transcode/transcode.c
- modules/video_filter/ci_filters.m


Changes:

=====================================
modules/access/meson.build
=====================================
@@ -119,7 +119,8 @@ if (get_option('macosx_avfoundation')
     vlc_modules += {
         'name' : 'avcapture',
         'sources' : files('avcapture.m'),
-        'dependencies' : [avfoundation_dep, coremedia_dep, foundation_dep, corevideo_dep]
+        'objc_args' : ['-fobjc-arc'],
+        'dependencies' : [avfoundation_dep, coremedia_dep, foundation_dep, corevideo_dep],
     }
 endif
 


=====================================
modules/gui/minimal_macosx/intf.m
=====================================
@@ -177,8 +177,6 @@ static void WindowSetFullscreen(vlc_window_t *p_wnd, const char *psz_id)
     }
 }
 
-static void WindowClose(vlc_window_t *);
-
 static const struct vlc_window_operations ops = {
     WindowEnable,
     WindowDisable,


=====================================
modules/gui/qt/widgets/native/roundimage.cpp
=====================================
@@ -351,6 +351,8 @@ namespace
             auto reply = engine->networkAccessManager()->get(request);
             return new NetworkImageResponse(reply, requestedSize, radius);
         }
+#else
+        return nullptr;
 #endif
     }
 }


=====================================
modules/services_discovery/bonjour.m
=====================================
@@ -139,7 +139,7 @@ static NSString * ipAddressAsStringForData(NSData * data)
     ip_socket_address *socketAddress = (ip_socket_address *)[data bytes];
 
     if (socketAddress) {
-        const char *addressStr;
+        const char *addressStr = NULL;
         if (socketAddress->sa.sa_family == AF_INET) {
             addressStr = inet_ntop(socketAddress->sa.sa_family,
                                            (void *)&(socketAddress->ipv4.sin_addr),
@@ -151,6 +151,8 @@ static NSString * ipAddressAsStringForData(NSData * data)
                                            addressBuffer,
                                            sizeof(addressBuffer));
         }
+        else vlc_assert_unreachable();
+
         if (addressStr != NULL) {
             returnValue = [NSString stringWithUTF8String:addressStr];
         }


=====================================
modules/stream_out/transcode/transcode.c
=====================================
@@ -784,29 +784,26 @@ static int Send( sout_stream_t *p_stream, void *_id, block_t *p_buffer )
         goto error;
     }
 
-    if( p_out )
+    for( block_t *it = p_out; it != NULL; )
     {
-        for( block_t *it = p_out; it != NULL; )
-        {
-            block_t *next = it->p_next;
-            it->p_next = NULL;
-
-            const vlc_tick_t pcr =
-                transcode_track_pcr_helper_SignalLeavingFrame( id->pcr_helper, it );
+        block_t *next = it->p_next;
+        it->p_next = NULL;
 
-            if( sout_StreamIdSend( p_stream->p_next, id->downstream_id, it ) != VLC_SUCCESS )
-            {
-                p_buffer = next;
-                goto error;
-            }
+        const vlc_tick_t pcr =
+            transcode_track_pcr_helper_SignalLeavingFrame( id->pcr_helper, it );
 
-            if( pcr != VLC_TICK_INVALID )
-            {
-                sout_StreamSetPCR( p_stream->p_next, pcr );
-            }
+        if( sout_StreamIdSend( p_stream->p_next, id->downstream_id, it ) != VLC_SUCCESS )
+        {
+            p_buffer = next;
+            goto error;
+        }
 
-            it = next;
+        if( pcr != VLC_TICK_INVALID )
+        {
+            sout_StreamSetPCR( p_stream->p_next, pcr );
         }
+
+        it = next;
     }
 
     if (i_ret != VLC_SUCCESS)


=====================================
modules/video_filter/ci_filters.m
=====================================
@@ -318,7 +318,6 @@ ParamsCallback(vlc_object_t *obj,
 
 static void filter_PsychedelicInit(filter_t *filter, struct filter_chain *fchain)
 {
-    filter_sys_t *sys = filter->p_sys;
     fchain->ctx.psychedelic.x = filter->fmt_in.video.i_width / 2;
     fchain->ctx.psychedelic.y = filter->fmt_in.video.i_height / 2;
     fchain->ctx.psychedelic.count = PSYCHEDELIC_COUNT_DEFAULT;
@@ -475,7 +474,6 @@ Open_FilterInit(filter_t *filter, struct filter_chain *fchain)
 
     for (int i = 0; i < NUM_FILTER_PARAM_MAX && filter_param_descs[i].vlc; ++i)
     {
-        NSString *ci_param_name = filter_param_descs[i].ci;
         char const *vlc_param_name = filter_param_descs[i].vlc;
 
         float vlc_param_val;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/31ead65b87ce57207983bceb0c5e50feb490acd3...836be4e3416646e6f38d497a7dfedbbfa906bdb8

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/31ead65b87ce57207983bceb0c5e50feb490acd3...836be4e3416646e6f38d497a7dfedbbfa906bdb8
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