From af24fd67aaa4e033c0d85cdd2be01504d3916680 Mon Sep 17 00:00:00 2001 From: Alex X Date: Fri, 13 Oct 2023 14:46:24 +0300 Subject: [PATCH] Fix snapshots for some streams --- pkg/magic/keyframe.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/magic/keyframe.go b/pkg/magic/keyframe.go index 2ac630906..d2ae80bd1 100644 --- a/pkg/magic/keyframe.go +++ b/pkg/magic/keyframe.go @@ -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: @@ -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: