Skip to content

Commit

Permalink
Minor updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
interkosmos committed Oct 22, 2024
1 parent b305e56 commit afaaf5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/dm_camera.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions src/dm_gm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit afaaf5c

Please sign in to comment.