忽略某些流声明存在却没实质数据的track

This commit is contained in:
ziyue 2021-10-28 10:53:07 +08:00
parent 5d56e86cfd
commit b42072405e

View File

@ -147,7 +147,12 @@ public:
* *
*/ */
bool ready() override { bool ready() override {
return true; return _ready;
}
bool inputFrame(const Frame::Ptr &frame) override {
_ready = true;
return AudioTrack::inputFrame(frame);
} }
/** /**
@ -171,6 +176,7 @@ public:
return _channels; return _channels;
} }
private: private:
bool _ready = false;
CodecId _codecid; CodecId _codecid;
int _sample_rate; int _sample_rate;
int _channels; int _channels;