Skip to content

Commit

Permalink
nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
biglittlebigben committed Nov 27, 2024
1 parent c7a99b0 commit b57acd1
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/ffprobe.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,14 @@ func verify(t *testing.T, in string, p *config.PipelineConfig, res *livekit.Egre
}

// Check source type
if p.RequestType == types.RequestTypeRoomComposite && (p.VideoEnabled || p.Layout != "") {
require.Equal(t, livekit.EgressSourceType_EGRESS_SOURCE_TYPE_WEB, res.SourceType)
} else if p.RequestType == types.RequestTypeWeb {
require.Equal(t, livekit.EgressSourceType_EGRESS_SOURCE_TYPE_WEB, res.SourceType)
} else if res != nil {
require.Equal(t, livekit.EgressSourceType_EGRESS_SOURCE_TYPE_SDK, res.SourceType)
if res != nil {
if p.RequestType == types.RequestTypeRoomComposite && (p.VideoEnabled || p.Layout != "") {
require.Equal(t, livekit.EgressSourceType_EGRESS_SOURCE_TYPE_WEB, res.SourceType)
} else if p.RequestType == types.RequestTypeWeb {
require.Equal(t, livekit.EgressSourceType_EGRESS_SOURCE_TYPE_WEB, res.SourceType)
} else {
require.Equal(t, livekit.EgressSourceType_EGRESS_SOURCE_TYPE_SDK, res.SourceType)
}
}

switch egressType {
Expand Down

0 comments on commit b57acd1

Please sign in to comment.