Skip to content

Commit b869265

Browse files
committed
h265: log packet size if remuxing is needed
1 parent 1081b30 commit b869265

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

internal/formatprocessor/h265.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,11 @@ func (t *h265) ProcessRTPPacket( //nolint:dupl
300300

301301
// RTP packets exceed maximum size: start re-encoding them
302302
if pkt.MarshalSize() > t.UDPMaxPayloadSize {
303-
t.Parent.Log(logger.Info, "RTP packets are too big, remuxing them into smaller ones")
303+
t.Parent.Log(logger.Info,
304+
"RTP packets are too big (%d > %d), remuxing them into smaller ones",
305+
pkt.MarshalSize(),
306+
t.UDPMaxPayloadSize,
307+
)
304308

305309
v1 := pkt.SSRC
306310
v2 := pkt.SequenceNumber

internal/formatprocessor/h265_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func TestH265OversizedPackets(t *testing.T) {
100100

101101
p, err := New(1472, forma, false,
102102
Logger(func(_ logger.Level, s string, i ...interface{}) {
103-
require.Equal(t, "RTP packets are too big, remuxing them into smaller ones", fmt.Sprintf(s, i...))
103+
require.Equal(t, "RTP packets are too big (2014 > 1472), remuxing them into smaller ones", fmt.Sprintf(s, i...))
104104
logged = true
105105
}))
106106
require.NoError(t, err)

0 commit comments

Comments
 (0)