Fix wrap nil error
In this case ReadVideoStreamMetadata return nil, nil because: func Wrap(err error, message string) error { if err == nil { return nil } ..... }
This commit is contained in:
parent
6e1e1d12ce
commit
bee0787ed4
|
@ -225,7 +225,7 @@ func ReadVideoStreamMetadata(videoPath string) (*ffprobe.Stream, error) {
|
|||
|
||||
stream := data.FirstVideoStream()
|
||||
if stream == nil {
|
||||
return nil, errors.Wrapf(err, "could not get stream from file metadata (%s)", path.Base(videoPath))
|
||||
return nil, errors.New(fmt.Sprintf("could not get stream from file metadata (%s)", path.Base(videoPath)))
|
||||
}
|
||||
|
||||
return stream, nil
|
||||
|
|
Loading…
Reference in New Issue