Skip to content

Commit

Permalink
bump Golang to 1.23 (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 authored Nov 4, 2024
1 parent 2831f92 commit f8a8d20
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: "1.22"
go-version: "1.23"

- uses: golangci/golangci-lint-action@v3
with:
version: v1.59.1
version: v1.61.0

go-mod-tidy:
runs-on: ubuntu-22.04
Expand All @@ -29,7 +29,7 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: "1.22"
go-version: "1.23"

- run: |
go mod tidy
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
go: ["1.20", "1.21", "1.22"]
go: ["1.21", "1.22", "1.23"]

steps:
- uses: actions/checkout@v4
Expand All @@ -24,7 +24,7 @@ jobs:

- run: make test-nodocker

- if: matrix.go == '1.22'
- if: matrix.go == '1.23'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BASE_IMAGE = golang:1.22-alpine3.18
LINT_IMAGE = golangci/golangci-lint:v1.59.1
BASE_IMAGE = golang:1.23-alpine3.20
LINT_IMAGE = golangci/golangci-lint:v1.61.0

.PHONY: $(shell ls)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/bluenviron/mediacommon

go 1.20
go 1.21

require (
github.com/abema/go-mp4 v1.2.0
Expand Down
8 changes: 4 additions & 4 deletions pkg/codecs/h264/dts_extractor2.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ func getPictureOrderCount(buf []byte, sps *SPS, idr bool) (uint32, error) {
}

func getPictureOrderCountDiff(a uint32, b uint32, sps *SPS) int32 {
max := uint32(1 << (sps.Log2MaxPicOrderCntLsbMinus4 + 4))
d := (a - b) & (max - 1)
if d > (max / 2) {
return int32(d) - int32(max)
maxVal := uint32(1 << (sps.Log2MaxPicOrderCntLsbMinus4 + 4))
d := (a - b) & (maxVal - 1)
if d > (maxVal / 2) {
return int32(d) - int32(maxVal)
}
return int32(d)
}
Expand Down
7 changes: 0 additions & 7 deletions pkg/codecs/h265/sps.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ var subHeightC = []uint32{
1,
}

func min(a, b int) int {
if a < b {
return a
}
return b
}

// SPS_ScalingListData is a scaling list data.
type SPS_ScalingListData struct { //nolint:revive
ScalingListPredModeFlag [4][6]bool
Expand Down

0 comments on commit f8a8d20

Please sign in to comment.