Skip to content

Commit

Permalink
Update extensions.go
Browse files Browse the repository at this point in the history
  • Loading branch information
p4xx07 authored May 30, 2023
1 parent 99d1b6b commit be4e970
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ffprobe/extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ func (p *Probe) GetResolution() (width int, height int) {
return videoStream.Width, videoStream.Height
}

func (p *Probe) GetStreamDuration(codecType string) (float64, error) {
func (p *Probe) GetStreamDuration(codecType ...string) (float64, error) {
selected := 'video'
if len(codecTypes) > 0{
selected = codecType[0]
}
var selected Stream
for _, stream := range p.Streams {
if stream.CodecType == codecType {
Expand Down

0 comments on commit be4e970

Please sign in to comment.