mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-08-03 16:09:14 +00:00
Fix wrap nil error (#1042)
* Fix wrap nil error
In this case ReadVideoStreamMetadata return nil, nil because:
func Wrap(err error, message string) error {
if err == nil {
return nil
}
.....
}
* Update process_video_task.go
This commit is contained in:
@@ -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, fmt.Errorf("could not get stream from file metadata (%s)", path.Base(videoPath))
|
||||
}
|
||||
|
||||
return stream, nil
|
||||
|
||||
Reference in New Issue
Block a user