+
+ // Do wait if we decoded all samples but we're still capturing
+ // Do not wait if we're done capturing
+ while (!interrupt_ && !frame_complete_ &&
+ (samples_decoded_ >= sample_count_) &&
+ (session_.get_capture_state() != Session::Stopped)) {
+