From d854f8ca8d3b4d105d3f6293f3af183654e9bdd0 Mon Sep 17 00:00:00 2001 From: y-kawawa Date: Sat, 11 Jan 2025 05:48:36 +0900 Subject: [PATCH] revert WithDONL for compatibility --- codecs/h265_packet.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/codecs/h265_packet.go b/codecs/h265_packet.go index 6a62927..c824538 100644 --- a/codecs/h265_packet.go +++ b/codecs/h265_packet.go @@ -778,6 +778,16 @@ func toAbsDON(don uint16, prevDON *uint16, prevAbsDON *int) int { return 0 } +// WithDONL can be called to specify whether or not DONL might be parsed. +// DONL may need to be parsed if `sprop-max-don-diff` is greater than 0 on the RTP stream. +// +// Deprecated: replaced by WithMaxDONDiff. +func (p *H265Packet) WithDONL(value bool) { + if value { + p.maxDONDiff = 1 + } +} + // WithMaxDONDiff sets the maximum difference between DON values before being emitted. func (p *H265Packet) WithMaxDONDiff(value uint16) { p.maxDONDiff = value