Skip to content

Commit

Permalink
Merge pull request #33 from mutablelogic/ffmpeg61
Browse files Browse the repository at this point in the history
Updated go-media for nil frames
  • Loading branch information
djthorpe committed Jul 29, 2024
2 parents b02b78a + 4254090 commit 08903f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
10 changes: 3 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/mutablelogic/go-media

go 1.20
go 1.22

toolchain go1.22.3

require (
github.com/alecthomas/kong v0.9.0
github.com/djthorpe/go-errors v1.0.3
github.com/djthorpe/go-tablewriter v0.0.8
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
github.com/llgcode/draw2d v0.0.0-20240627062922-0ed1ff131195
github.com/mutablelogic/go-client v1.0.8
Expand All @@ -16,11 +16,7 @@ require (

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
golang.org/x/image v0.18.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
7 changes: 5 additions & 2 deletions pkg/ffmpeg/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,11 @@ func (d *Decoder) decode(packet *ff.AVPacket, fn DecoderFrameFn) error {
}

// Copy across the timebase and pts
(*ff.AVFrame)(dest).SetPts(d.frame.Pts())
(*ff.AVFrame)(dest).SetTimeBase(d.timeBase)
// TODO if dest != nil {
// fmt.Println("pts=", d.frame.Pts())
// (*ff.AVFrame)(dest).SetPts(d.frame.Pts())
// (*ff.AVFrame)(dest).SetTimeBase(d.timeBase)
//}

// Pass back to the caller
if err := fn(d.stream, dest); errors.Is(err, io.EOF) {
Expand Down

0 comments on commit 08903f1

Please sign in to comment.