From b42072405eb462fe2e99b4db199059bbe6bd32ac Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Thu, 28 Oct 2021 10:53:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=BD=E7=95=A5=E6=9F=90=E4=BA=9B=E6=B5=81?= =?UTF-8?q?=E5=A3=B0=E6=98=8E=E5=AD=98=E5=9C=A8=E5=8D=B4=E6=B2=A1=E5=AE=9E?= =?UTF-8?q?=E8=B4=A8=E6=95=B0=E6=8D=AE=E7=9A=84track?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Extension/Track.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Extension/Track.h b/src/Extension/Track.h index aa03d8da..a9317389 100644 --- a/src/Extension/Track.h +++ b/src/Extension/Track.h @@ -147,7 +147,12 @@ public: * 是否已经初始化 */ 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; } private: + bool _ready = false; CodecId _codecid; int _sample_rate; int _channels;