Skip to content

Commit

Permalink
workaround for OPUS, stop blocking!
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricve committed May 9, 2023
1 parent b4e0345 commit 0bb31e0
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions format/rtsp/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -816,13 +816,18 @@ func (self *Stream) makeCodecData() (err error) {
err = fmt.Errorf("rtsp: aac sdp config invalid: %s", err)
return
}
/*case av.OPUS:
channelLayout := av.CH_MONO
if media.ChannelCount == 2 {
channelLayout = av.CH_STEREO
}
case av.OPUS:

// TODO!
self.CodecData = codec.NewPCMMulawCodecData()

//channelLayout := av.CH_MONO
//if media.ChannelCount == 2 {
// channelLayout = av.CH_STEREO
//}

//self.CodecData = codec.NewOpusCodecData(media.TimeScale, channelLayout)

self.CodecData = codec.NewOpusCodecData(media.TimeScale, channelLayout)*/
default:
err = fmt.Errorf("rtsp: Type=%d unsupported", media.Type)
return
Expand Down

0 comments on commit 0bb31e0

Please sign in to comment.