Skip to content

Commit

Permalink
Fix snapshots for some streams
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Oct 13, 2023
1 parent e2cd34f commit af24fd6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/magic/keyframe.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ func (k *Keyframe) AddTrack(media *core.Media, _ *core.Codec, track *core.Receiv

if track.Codec.IsRTP() {
sender.Handler = h264.RTPDepay(track.Codec, sender.Handler)
} else {
sender.Handler = h264.RepairAVCC(track.Codec, sender.Handler)
}

case core.CodecH265:
Expand All @@ -66,9 +68,7 @@ func (k *Keyframe) AddTrack(media *core.Media, _ *core.Codec, track *core.Receiv
}

if track.Codec.IsRTP() {
sender.Handler = h264.RTPDepay(track.Codec, sender.Handler)
} else {
sender.Handler = h264.RepairAVCC(track.Codec, sender.Handler)
sender.Handler = h265.RTPDepay(track.Codec, sender.Handler)
}

case core.CodecJPEG:
Expand Down

0 comments on commit af24fd6

Please sign in to comment.