If code calls va_isDRI2Connected multiple times there is no protection
against calling open(device_name, O_RDWR) again and losing the reference
to the original file descriptor.
A recent change (bc8a12) calls the method twice each time libva is
initialized, thus causing a leak of device file descriptors.
This change moves the initializing of the fd and auth_type to the
creation of the dri_state and then checks to see if they have already
been initialized. If so, the method va_isDRIConnected returns true
and fills in driver_name.
829bde7...
by
Michael Weiss <email address hidden>
travis: Add a test that code files don't have the exec bit set
C source code and header files shouldn't be executable.
This is a problem that already occurred pretty often in the past and was
e.g. fixed in 5d8c5ae, be95415, and 8352ab9. Therefore it seems like a
good idea to add a CI check to prevent this issue from reappearing
(probably mostly accidents due to wrong Git configurations, etc.).
Signed-off-by: Michael Weiss <email address hidden>
7805675...
by
Michael Weiss <email address hidden>
Remove the execute bit from all source code files
C source code and header files shouldn't be executable. When building
libva via Meson the affected files would be installed with the execute
file mode bit set (with GNU Autotools this wasn't the case).
To check: find -name '*.[ch]' -executable
Signed-off-by: Michael Weiss <email address hidden>
ede255b...
by
Michael Weiss <email address hidden>
meson: Allow for libdir and includedir to be absolute paths
Meson allows to use absolute paths for libdir and includedir [0]. But if
they're absolute paths one must not append the prefix. The join_paths()
function [1] nicely supports both relative and absolute paths.
This is e.g. important for Nixpkgs (i.e. Nix(OS)) where binaries and
library files are usually installed under different prefixes.