From 43d48a23263702c67e59031433bac347fa19806e Mon Sep 17 00:00:00 2001 From: zayeem shaikh Date: Fri, 13 Nov 2026 22:42:18 +0530 Subject: [PATCH] drop rtp packets shorter than the payload header in stream_expand --- src/apps/ojph_stream_expand/stream_expand_support.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/apps/ojph_stream_expand/stream_expand_support.cpp b/src/apps/ojph_stream_expand/stream_expand_support.cpp index 1a56d40c..77cc2078 100644 --- a/src/apps/ojph_stream_expand/stream_expand_support.cpp +++ b/src/apps/ojph_stream_expand/stream_expand_support.cpp @@ -122,7 +122,9 @@ rtp_packet* packets_handler::exchange(rtp_packet* p) assert(num_packets > 0 && p == in_use); if (p != NULL) { - if (p->num_bytes == 0) + // ignore packets that are too short to hold the 12-byte RTP header + // and the 8-byte payload header + if (p->num_bytes < 20) return p; if (last_seq_num == 0) // initialization