Signed-off-by: assertsu <subenhui@huawei.com>
This commit is contained in:
assertsu 2024-09-18 07:37:10 +00:00 committed by Gitee
parent 8fbc42e0e4
commit 27e2f3ac6b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -403,8 +403,12 @@ void AudioSink::CalcMaxAmplitude(std::shared_ptr<AVBuffer> filledOutputBuffer)
bool AudioSink::DropApeBuffer(std::shared_ptr<AVBuffer> filledOutputBuffer)
{
FALSE_RETURN_V(isApe_, false);
FALSE_RETURN_V(seekTimeUs_ != HST_TIME_NONE, false);
if (isApe_ == false) {
return false;
}
if (seekTimeUs_ == HST_TIME_NONE) {
return false;
}
if (filledOutputBuffer->pts_ < seekTimeUs_) {
MEDIA_LOG_D("Drop ape buffer pts = " PUBLIC_LOG_D64, filledOutputBuffer->pts_);
inputBufferQueueConsumer_->ReleaseBuffer(filledOutputBuffer);