mirror of
https://github.com/livepeer/lpms
synced 2025-09-26 19:51:36 +08:00
satisfy linter
This commit is contained in:
@@ -513,7 +513,7 @@ func shortSegments(t *testing.T, accel Acceleration, fc int) {
|
||||
if fc != res.Decoded.Frames {
|
||||
t.Error("Did not decode expected number of frames: ", res.Decoded.Frames)
|
||||
}
|
||||
if 0 == res.Encoded[0].Frames {
|
||||
if res.Encoded[0].Frames == 0 {
|
||||
// TODO not sure what should be a reasonable number here
|
||||
t.Error("Did not encode any frames: ", res.Encoded[0].Frames)
|
||||
}
|
||||
@@ -625,7 +625,7 @@ func shortSegments(t *testing.T, accel Acceleration, fc int) {
|
||||
if fc != res.Decoded.Frames {
|
||||
t.Error("Did not decode expected number of frames: ", res.Decoded.Frames)
|
||||
}
|
||||
if 0 == res.Encoded[0].Frames {
|
||||
if res.Encoded[0].Frames == 0 {
|
||||
t.Error("Did not encode any frames: ", res.Encoded[0].Frames)
|
||||
}
|
||||
|
||||
@@ -664,7 +664,7 @@ func shortSegments(t *testing.T, accel Acceleration, fc int) {
|
||||
}
|
||||
if res.Encoded[0].Frames == 0 || res.Encoded[1].Frames != 0 || res.Encoded[2].Frames != fc {
|
||||
t.Error("Unexpected frame counts from short segment copy-drop-passthrough case")
|
||||
t.Error(res)
|
||||
t.Errorf("res: %+v", *res)
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -35,7 +35,7 @@ func error_map() map[int]error {
|
||||
}
|
||||
for i := -255; i < 0; i++ {
|
||||
v := Strerror(i)
|
||||
if "UNKNOWN_ERROR" != v {
|
||||
if v != "UNKNOWN_ERROR" {
|
||||
m[i] = errors.New(v)
|
||||
}
|
||||
}
|
||||
@@ -62,9 +62,7 @@ func non_retryable_errs() []string {
|
||||
"Decoder not found", "Demuxer not found", "Encoder not found",
|
||||
"Muxer not found", "Option not found", "Invalid argument",
|
||||
}
|
||||
for _, v := range ffmpegErrors {
|
||||
errs = append(errs, v)
|
||||
}
|
||||
errs = append(errs, ffmpegErrors...)
|
||||
// Add in ffmpeg.go transcoder specific errors
|
||||
transcoderErrors := []error{
|
||||
ErrTranscoderRes, ErrTranscoderVid, ErrTranscoderFmt,
|
||||
|
@@ -1436,7 +1436,7 @@ func TestTranscoder_FormatOptions(t *testing.T) {
|
||||
// If format *and* mux opts specified, should prefer format opts
|
||||
tsFmt := out[0]
|
||||
mp4Fmt := out[0]
|
||||
if "hls" != tsFmt.Muxer.Name || "hls" != mp4Fmt.Muxer.Name {
|
||||
if tsFmt.Muxer.Name != "hls" || mp4Fmt.Muxer.Name != "hls" {
|
||||
t.Error("Sanity check failed; expected non-empty muxer format names")
|
||||
}
|
||||
tsFmt.Oname = dir + "/actually_mpegts.flv"
|
||||
|
Reference in New Issue
Block a user