Added checks for videos with no audio
This commit is contained in:
parent
22247d6492
commit
abdeecf6e4
2 changed files with 30 additions and 12 deletions
4
video.go
4
video.go
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue