From afaaf5c618fe786587b7d9600beba2f0559f36c9 Mon Sep 17 00:00:00 2001 From: interkosmos Date: Tue, 22 Oct 2024 15:47:13 +0200 Subject: [PATCH] Minor updates. --- src/dm_camera.f90 | 2 +- src/dm_gm.f90 | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/dm_camera.f90 b/src/dm_camera.f90 index f927a4c..106b2d6 100644 --- a/src/dm_camera.f90 +++ b/src/dm_camera.f90 @@ -154,7 +154,7 @@ end function dm_camera_device_is_valid ! ************************************************************************** ! PRIVATE PROCEDURES. ! ************************************************************************** - subroutine camera_prepare_capture(command, camera, output) + pure elemental subroutine camera_prepare_capture(command, camera, output) !! Creates FFmpeg command to capture a single camera frame through V4L !! or RTSP. The function returns `E_INVALID` on error. character(len=CAMERA_COMMAND_LEN), intent(out) :: command !! Prepared command string. diff --git a/src/dm_gm.f90 b/src/dm_gm.f90 index 77907f2..e10c6ec 100644 --- a/src/dm_gm.f90 +++ b/src/dm_gm.f90 @@ -550,14 +550,13 @@ integer function gm_identify(path, format, output) result(rc) rc = dm_pipe_open(pipe, 'gm identify -format "' // trim(format) // '" ' // trim(path), PIPE_RDONLY) if (dm_is_error(rc)) return - rc = E_READ n = dm_pipe_read(pipe, output) call dm_pipe_close(pipe) ! Remove null character. if (n == 0) then output(1:1) = ' ' - return + rc = E_READ else output(n:n) = ' ' rc = E_NONE