From 48aeca75f167f17450e79a9a5557f667b825f508 Mon Sep 17 00:00:00 2001 From: winlin Date: Tue, 19 May 2026 09:57:00 -0400 Subject: [PATCH] Edge: Dump cached metadata and sequence headers to late-joining consumers. After v7.0.94 stopped creating SrsOriginHub on edge, the hub_active gate in consumer_dumps() always evaluated false on edge, so late-joining players never received the cached onMetaData / AVC SH / AAC SH and failed with "dimensions not set". Fall back to the meta cache state when hub_ is NULL so the dump path runs once the edge-pull has fetched headers. Co-Authored-By: Claude Opus 4.7 (1M context) --- trunk/src/app/srs_app_rtmp_source.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trunk/src/app/srs_app_rtmp_source.cpp b/trunk/src/app/srs_app_rtmp_source.cpp index 724fc49f7..6731a1d2a 100644 --- a/trunk/src/app/srs_app_rtmp_source.cpp +++ b/trunk/src/app/srs_app_rtmp_source.cpp @@ -2559,7 +2559,10 @@ srs_error_t SrsLiveSource::consumer_dumps(ISrsLiveConsumer *consumer, bool ds, b } // If stream is publishing, dumps the sequence header and gop cache. - bool hub_active = hub_ ? hub_->active() : false; + // On edge, hub_ is NULL; the source is "publishing" once the edge-pull has + // populated the meta cache. Late-joining consumers must still receive the + // cached metadata + sequence headers + GOP via this path. + bool hub_active = hub_ ? hub_->active() : (meta_->data() || meta_->vsh() || meta_->ash()); if (hub_active) { // Copy metadata and sequence header to consumer. if ((err = meta_->dumps(consumer, atc_, jitter_algorithm_, dm, ds)) != srs_success) {