Skip the long scenarios since the video convert/update can take some
time (on a 24h scale).
Only the normal scenario is checking if video play dates are correct.
Other scenarios will fail. Video rendering is enabled anyway in most
scenarios so that it can used to visualize video timestamps with a
output tracer.
If the source is the master, it needs to handle the delay itself by
delaying the playback by the delta returned by vlc_clock_SetDelay() (for
slaves, the return value will be always 0). This is already done by the
audio output, that is sending silence to reach that delta.
The delay was applied 2 times, one time in the audio output and one time
in the clock. Therefore, remove that extra delay.
The input region is a text region, it should not have a palette. We would
overwrite the input palette with out own values!
subpicture_region_New() takes care of creating a palette if the format
doesn't have one.
The `test` call expects two values between an operator like `=` and the
output of pkg-config can be null. In that case, no argument is given for
an empty string without proper quoting and test signal an error.
The definition of read() and write() mandate from their prototype that
the return value and errno must be checked since the syscall can be
interrupted without being processed by a signal:
../../src/misc/interrupt.c: In function 'vlc_poll_i11e_inner':
WARNING : ../../src/misc/interrupt.c:358: 9: ignoring return value of 'read' declared with attribute 'warn_unused_result' [-Wunused-result]
358 | read(fd[0], &dummy, sizeof (dummy));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/misc/interrupt.c: In function 'vlc_poll_i11e_wake':
WARNING : ../../src/misc/interrupt.c:299: 5: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
299 | write(fd[1], &value, sizeof (value));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In practice, we write and read into an eventfd or a pipe descriptor, and
we only read when poll() notify that a read operation will be
non-blocking, so the interruption can mostly never happen in production,
but it can happen when using different tools, like ones using SIGPROF
for instance.
See also commit 2f2a478740.
The previous `!= 0` was kept when the replacement to ARRAY_SIZE() was
done. Since <BOOL> != 0 evaluates to <BOOL>, no regression happened
because of that oversight.
Forgotten from 1eed0681cd.
GCC and Clang can check that the % format strings are used with the proper
types. If they are not that can lead to security issues.
This cannot be added to global CFLAGS as it will issue an error when testing
for asprintf/vasprintf in AC_REPLACE_FUNCS().