Commit 4d480644 authored by Philippe Gorley's avatar Philippe Gorley Committed by Sébastien Blin

audio_frame_resizer: prevent bad function calls

Change-Id: Ic8dd7dce8ca618a2e0a052db5afdf6eee80e06fa
Reviewed-by: Sébastien Blin's avatarSebastien Blin <sebastien.blin@savoirfairelinux.com>
parent 62cc1bab
......@@ -98,7 +98,8 @@ AudioFrameResizer::enqueue(std::shared_ptr<AudioFrame>&& frame)
auto nb_samples = samples();
if (nb_samples == 0 && f->nb_samples == frameSize_) {
nextOutputPts_ = frame->pointer()->pts + frameSize_;
cb_(std::move(frame));
if (cb_)
cb_(std::move(frame));
return; // return if frame was just passed through
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment