Added checks for videos with no audio

This commit is contained in:
Alex Eidt 2022-04-01 17:00:53 -07:00
parent 22247d6492
commit abdeecf6e4
2 changed files with 30 additions and 12 deletions

View file

@ -79,7 +79,9 @@ func NewVideo(filename string) *Video {
video := &Video{filename: filename, depth: 3}
addVideoData(videoData, video)
video.audio_codec = audioData["codec_name"]
if audio_codec, ok := audioData["codec_name"]; ok {
video.audio_codec = audio_codec
}
return video
}