mirror of
https://github.com/aler9/gortsplib
synced 2025-10-08 16:40:09 +08:00
add CreateDecoder() method to all tracks that can be decoded
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/aler9/gortsplib"
|
||||
"github.com/aler9/gortsplib/pkg/rtph264"
|
||||
"github.com/aler9/gortsplib/pkg/url"
|
||||
)
|
||||
|
||||
@@ -75,10 +74,7 @@ func main() {
|
||||
}
|
||||
|
||||
// setup RTP/H264->H264 decoder
|
||||
rtpDec := &rtph264.Decoder{
|
||||
PacketizationMode: track.PacketizationMode,
|
||||
}
|
||||
rtpDec.Init()
|
||||
rtpDec := track.CreateDecoder()
|
||||
|
||||
// setup H264->raw frames decoder
|
||||
h264RawDec, err := newH264Decoder()
|
||||
|
Reference in New Issue
Block a user