[vlc-commits] [Git][videolan/vlc][master] 3 commits: demux: timestamps_filter: reindent block code

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Thu Aug 10 21:33:33 UTC 2023



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
9303c61c by Alexandre Janniaux at 2023-08-10T21:20:20+00:00
demux: timestamps_filter: reindent block code

- - - - -
b512108b by Alexandre Janniaux at 2023-08-10T21:20:20+00:00
demux: timestamps_filter: use PRId64 for vlc_tick_t

Fix format warnings:

    ../test/modules/demux/../../../modules/demux/timestamps_filter.h:111:58: warning: format specifies type 'long' but the argument has type 'long long' [-Wformat]
                    printf("%4.4s found offset of %ld\n", s, (prev->dts - i_dts));
                                                  ~~~        ^~~~~~~~~~~~~~~~~~~
                                                  %lld
    ../test/modules/demux/../../../modules/demux/timestamps_filter.h:192:67: warning: format specifies type 'long' but the argument has type 'vlc_tick_t' (aka 'long long') [-Wformat]
                        printf("PCR  no previous value, using %ld\n", max);
                                                              ~~~     ^~~
                                                              %lld

- - - - -
4a25b39b by Alexandre Janniaux at 2023-08-10T21:20:20+00:00
test: opengl/filters: add message for static_assert

This fixes a warning since the code is not compiled in C2x yet.

    ../test/modules/video_output/opengl/filters.c:50:42: warning: '_Static_assert' with no message is a C2x extension [-Wc2x-extensions]
        VLC_TEST_OPENGL_API == VLC_OPENGL_ES2);
                                             ^
                                             , ""

- - - - -


2 changed files:

- modules/demux/timestamps_filter.h
- test/modules/video_output/opengl/filters.c


Changes:

=====================================
modules/demux/timestamps_filter.h
=====================================
@@ -108,7 +108,7 @@ static bool timestamps_filter_push(const char *s, struct timestamps_filter_s *tf
                 tf->sync.contiguous = tf->contiguous_last + prev->diff;
                 tf->sequence_offset = tf->sync.contiguous - tf->sync.stream;
 #ifdef DEBUG_TIMESTAMPS_FILTER
-                printf("%4.4s found offset of %ld\n", s, (prev->dts - i_dts));
+                printf("%4.4s found offset of %" PRId64 "\n", s, (prev->dts - i_dts));
 #endif
                 b_desync = true;
             }
@@ -189,11 +189,11 @@ static int timestamps_filter_es_out_Control(es_out_t *out, input_source_t *in, i
                     if(max)
                     {
 #ifdef DEBUG_TIMESTAMPS_FILTER
-                    printf("PCR  no previous value, using %ld\n", max);
+                        printf("PCR  no previous value, using %" PRId64 "\n", max);
 #endif
-                    p_sys->pcrtf.sync.stream = pcr;
-                    p_sys->pcrtf.sync.contiguous = max;
-                    p_sys->pcrtf.sequence_offset = max - pcr;
+                        p_sys->pcrtf.sync.stream = pcr;
+                        p_sys->pcrtf.sync.contiguous = max;
+                        p_sys->pcrtf.sequence_offset = max - pcr;
                     }
                 }
             }


=====================================
test/modules/video_output/opengl/filters.c
=====================================
@@ -47,7 +47,8 @@
 
 static_assert(
     VLC_TEST_OPENGL_API == VLC_OPENGL ||
-    VLC_TEST_OPENGL_API == VLC_OPENGL_ES2);
+    VLC_TEST_OPENGL_API == VLC_OPENGL_ES2,
+    "VLC_TEST_OPENGL_API must be assigned to VLC_OPENGL or VLC_OPENGL_ES2");
 
 const char vlc_module_name[] = MODULE_STRING;
 static const uint8_t green[] = { 0x0, 0xff, 0x00, 0xff };



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/2f2a47874029706f0b0ef37ec8d23c8256ceb07c...4a25b39be3cb2f7477db628be56b391d3f5ebffa

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/2f2a47874029706f0b0ef37ec8d23c8256ceb07c...4a25b39be3cb2f7477db628be56b391d3f5ebffa
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