Skip to content

Commit

Permalink
webrtx muxer: fix timeout in case of H264 tracks
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 committed Jan 6, 2023
1 parent 777860f commit ec1f957
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/core/webrtc_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"sync"
"time"

"github.com/aler9/gortsplib/v2/pkg/codecs/h264"
"github.com/aler9/gortsplib/v2/pkg/format"
"github.com/aler9/gortsplib/v2/pkg/formatdecenc/rtph264"
"github.com/aler9/gortsplib/v2/pkg/formatdecenc/rtpvp8"
Expand Down Expand Up @@ -430,7 +429,7 @@ outer:

// do NOT close the WebSocket connection
// in order to allow the other side of the connection
// o switch to the "connected" state before WebSocket is closed.
// to switch to the "connected" state before WebSocket is closed.

ldesc, rdesc := describeActiveCandidates(pc)
c.log(logger.Info, "peer connection established, local candidate: %v, remote candidate: %v", ldesc, rdesc)
Expand Down Expand Up @@ -609,10 +608,6 @@ func (c *webRTCConn) allocateTracks(medias media.Medias) ([]*webRTCTrack, error)
}

if !firstNALUReceived {
if !h264.IDRPresent(tdata.AU) {
return
}

firstNALUReceived = true
lastPTS = tdata.PTS
} else {
Expand Down

0 comments on commit ec1f957

Please sign in to comment.