From 822237ce11859ffd3351e65899ad566c43e3a414 Mon Sep 17 00:00:00 2001 From: im-pingo Date: Fri, 28 Aug 2026 18:36:51 +0800 Subject: [PATCH 1/2] test: synchronize AAC codec epoch transition --- module/httpstream/muxer_worker_audiocodec_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/httpstream/muxer_worker_audiocodec_test.go b/module/httpstream/muxer_worker_audiocodec_test.go index 6c5fb511..ce95e726 100644 --- a/module/httpstream/muxer_worker_audiocodec_test.go +++ b/module/httpstream/muxer_worker_audiocodec_test.go @@ -272,6 +272,11 @@ func TestSharedMuxersSwitchFromDirectAACToTransformedAudio(t *testing.T) { avframe.MediaTypeVideo, avframe.CodecH264, avframe.FrameTypeInterframe, 500, 500, []byte{0, 0, 0, 2, 0x41, 0x05}, )) + // Establish the direct-AAC epoch before introducing an incompatible + // source codec. The live and transformed readers share an unbuffered + // delivery channel, so writing both epochs back-to-back would let + // scheduler timing discard an initial direct frame. + packets = waitForMuxerPayloads(t, format, initData, reader, packets, directAAC) writeG711MuxerFrames(stream, 1000, 20, 0xff) stream.WriteFrame(avframe.NewAVFrame( avframe.MediaTypeVideo, avframe.CodecH264, avframe.FrameTypeInterframe, From b4bd8692bf85809820bab28a29c38dd707364180 Mon Sep 17 00:00:00 2001 From: im-pingo Date: Fri, 28 Aug 2026 18:43:02 +0800 Subject: [PATCH 2/2] docs: record muxer epoch test ordering --- docs/superpowers/plans/2026-08-28-ci-main-green.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/superpowers/plans/2026-08-28-ci-main-green.md b/docs/superpowers/plans/2026-08-28-ci-main-green.md index ce851b77..cc284c80 100644 --- a/docs/superpowers/plans/2026-08-28-ci-main-green.md +++ b/docs/superpowers/plans/2026-08-28-ci-main-green.md @@ -10,6 +10,13 @@ **Spec:** `docs/TECHNICAL-RISKS.md` and `AGENTS.md`. +The shared HTTP muxer codec-epoch regression must establish the direct AAC +output before injecting the next source codec. FLV and TS emit that output +immediately, while fMP4 requires the DTS=500 video boundary to flush its +fragment; the test therefore waits after that boundary and before G.711 +input. This keeps the test independent of goroutine scheduling while still +covering the direct-to-transformed transition. + ## Global Constraints - Use Go 1.26 or newer and the repository's `audiocodec` build tag for the tagged baseline.