Skip to content

Commit

Permalink
给 ffmpeg 设置执行权限
Browse files Browse the repository at this point in the history
  • Loading branch information
tangshimin committed Aug 27, 2024
1 parent 4dcf159 commit 2a3e040
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/kotlin/ffmpeg/FFmpegUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ fun findFFmpegPath(): String {
val path: String = if(isWindows()){
getResourcesFile("ffmpeg/ffmpeg.exe").absolutePath
}else{
val ffmpegFile = getResourcesFile("ffmpeg/ffmpeg")
if(ffmpegFile.exists() && !ffmpegFile.canExecute()){
ffmpegFile.setExecutable(true)
}
getResourcesFile("ffmpeg/ffmpeg").absolutePath
}
return path
Expand Down

0 comments on commit 2a3e040

Please sign in to comment.