1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Fix #1303, do not dispatch previous meta when not publishing. 3.0.109

This commit is contained in:
winlin 2020-01-27 19:46:08 +08:00
parent 01870cce56
commit 5d365bade8
4 changed files with 28 additions and 17 deletions

View file

@ -330,7 +330,6 @@ class SrsOriginHub : public ISrsReloadHandler
private:
SrsSource* source;
SrsRequest* req;
// Whether the stream hub is active, or stream is publishing.
bool is_active;
private:
// The format, codec information.
@ -364,6 +363,8 @@ public:
// Cycle the hub, process some regular events,
// For example, dispose hls in cycle.
virtual srs_error_t cycle();
// Whether the stream hub is active, or stream is publishing.
virtual bool active();
public:
// When got a parsed metadata.
virtual srs_error_t on_meta_data(SrsSharedPtrMessage* shared_metadata, SrsOnMetaDataPacket* packet);
@ -376,7 +377,7 @@ public:
virtual srs_error_t on_publish();
// When stop publish stream.
virtual void on_unpublish();
// Internal callback.
// Internal callback.
public:
// For the SrsForwarder to callback to request the sequence headers.
virtual srs_error_t on_forwarder_start(SrsForwarder* forwarder);