Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
deluan committed Jun 2, 2023
1 parent 3fc4313 commit cec5fb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ linters:
- asciicheck
- bidichk
- bodyclose
- depguard
- dogsled
- durationcheck
- errcheck
Expand Down
6 changes: 3 additions & 3 deletions core/media_streamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ func (s *Stream) EstimatedContentLength() int {
func selectTranscodingOptions(ctx context.Context, ds model.DataStore, mf *model.MediaFile, reqFormat string, reqBitRate int) (format string, bitRate int) {
format = "raw"
if reqFormat == "raw" {
return
return format, 0
}
if reqFormat == mf.Suffix && reqBitRate == 0 {
bitRate = mf.BitRate
return
return format, bitRate
}
trc, hasDefault := request.TranscodingFrom(ctx)
var cFormat string
Expand All @@ -159,7 +159,7 @@ func selectTranscodingOptions(ctx context.Context, ds model.DataStore, mf *model
cBitRate = reqBitRate
}
if cBitRate == 0 && cFormat == "" {
return
return format, bitRate
}
t, err := ds.Transcoding(ctx).FindByFormat(cFormat)
if err == nil {
Expand Down

0 comments on commit cec5fb0

Please sign in to comment.