Skip to content
Snippets Groups Projects
Commit c0712e42 authored by Adrien Béraud's avatar Adrien Béraud Committed by Philippe Gorley
Browse files

audio frame resizer: avoid dropping valid frames


Change-Id: I456c6cbe5ec12055902647ac43d416e83b93e8d2
Reviewed-by: default avatarPhilippe Gorley <philippe.gorley@savoirfairelinux.com>
parent 5769d613
No related branches found
No related tags found
No related merge requests found
...@@ -96,9 +96,8 @@ AudioFrameResizer::enqueue(std::shared_ptr<AudioFrame>&& frame) ...@@ -96,9 +96,8 @@ AudioFrameResizer::enqueue(std::shared_ptr<AudioFrame>&& frame)
} }
auto nb_samples = samples(); auto nb_samples = samples();
if (nb_samples == 0 && f->nb_samples == frameSize_) { if (cb_ && nb_samples == 0 && f->nb_samples == frameSize_) {
nextOutputPts_ = frame->pointer()->pts + frameSize_; nextOutputPts_ = frame->pointer()->pts + frameSize_;
if (cb_)
cb_(std::move(frame)); cb_(std::move(frame));
return; // return if frame was just passed through return; // return if frame was just passed through
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment