Repository navigation
fix(rtp): unwrap long sequences, scan late RTP, cap totals, one deadline, drop FU-A gaps - #36
Merged
Merged
Conversation
…ine, drop FU-A gaps - order_packets unwraps the 16-bit RTP sequence into a 32-bit extended sequence in arrival order, so captures past 32768 packets and real 65535->0 wraps keep their order; dedup is unchanged. - The presence gate now walks the whole capture (bounded by MAX_SCAN_PACKETS and GATE_BYTES) so RTP starting after 5000 frames is still found, while the full scan stays a separate bounded pass. - parse_capture enforces MAX_TOTAL_BYTES across all SSRCs and MAX_SSRCS candidate streams, checked before retaining payload. - run() computes one FFMPEG_BUDGET_S deadline shared by every ffmpeg call; _extract_frames never starts a call after it expires. - depacketize_h264 tracks the expected next sequence while reassembling FU-A and drops a partial NAL when the sequence jumps. Tests: 542 passed (7 new, 535 pre-existing). Real case: wani24-streamer.pcap PASS 194.0 s. Lint: ./ctf lint clean; docker compose config -q ok. Refs #26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the five defects from the ARBITER REJECT of
20c7fee(#26).Cosa
order_packets: unwraps the 16-bit RTP sequence to a 32-bit extended sequence in arrival order (dedup + sort). 40k in-order packets and real 65535→0 wraps keep order.MAX_SCAN_PACKETS+ a byte bound, so RTP after the first 5000 frames is found (no more analysis lost).parse_capture: global byte budget (MAX_TOTAL_BYTES=96 MiB) + SSRC cap (MAX_SSRCS=32), enforced before retaining payload.FFMPEG_BUDGET_S=240deadline across all ffmpeg calls; no call starts after it.depacketize_h264: a sequence gap in an FU-A fragment drops the partial NAL instead of emitting a corrupt one.Come è stata lavorata
feat/26-rtp-order(TDD: 7 test nuovi che fallivano col codice vecchio), poi ARBITER a contesto pulito: 1 giro, APPROVE.542 passed(20 in test_rtp.py, 7 nuovi) ·./ctf lintclean · real casewani24-streamer.pcap[PASS].Rischi residui
.pcap; i non-pcap escono al magic in millisecondi). Conseguenza diretta e voluta del "scan the whole capture".Closes #26