Skip to content

Commit 48aeca7

Browse files
winlinvipclaude
andcommitted
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) <noreply@anthropic.com>
1 parent eb9141e commit 48aeca7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

trunk/src/app/srs_app_rtmp_source.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2559,7 +2559,10 @@ srs_error_t SrsLiveSource::consumer_dumps(ISrsLiveConsumer *consumer, bool ds, b
25592559
}
25602560

25612561
// If stream is publishing, dumps the sequence header and gop cache.
2562-
bool hub_active = hub_ ? hub_->active() : false;
2562+
// On edge, hub_ is NULL; the source is "publishing" once the edge-pull has
2563+
// populated the meta cache. Late-joining consumers must still receive the
2564+
// cached metadata + sequence headers + GOP via this path.
2565+
bool hub_active = hub_ ? hub_->active() : (meta_->data() || meta_->vsh() || meta_->ash());
25632566
if (hub_active) {
25642567
// Copy metadata and sequence header to consumer.
25652568
if ((err = meta_->dumps(consumer, atc_, jitter_algorithm_, dm, ds)) != srs_success) {

0 commit comments

Comments
 (0)