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

TS: Support disable audio or video to make mpegts.js happy. v6.0.9 (#465) (#939)

This commit is contained in:
winlin 2022-12-26 19:03:49 +08:00
parent 4b6f1b0fd6
commit d5bf0ba2da
7 changed files with 44 additions and 11 deletions

View file

@ -1332,6 +1332,8 @@ class SrsTsTransmuxer
{
private:
ISrsStreamWriter* writer;
bool has_audio_;
bool has_video_;
private:
SrsFormat* format;
SrsTsMessageCache* tsmc;
@ -1340,6 +1342,9 @@ private:
public:
SrsTsTransmuxer();
virtual ~SrsTsTransmuxer();
public:
void set_has_audio(bool v);
void set_has_video(bool v);
public:
// Initialize the underlayer file stream.
// @param fw the writer to use for ts encoder, user must free it.