                         }
                         
                         videoInput.appendSampleBuffer(videoSampleBuffer)
+                        videoBuffers += 1
                         lastVideoPts = CMSampleBufferGetPresentationTimeStamp(videoSampleBuffer)
                         
                         if VideoMergeManagerPrintPts {

        
        return (nil, nil)
    }
}
                        videoBasePts = audioBasePts
                    }
                    else {
                        if let test = audioFormatHint {
                            let diff = CMTimeSubtract(videoBasePts, audioBasePts)
                            let sampleRate = CMAudioFormatDescriptionGetStreamBasicDescription(test).memory.mSampleRate
                            let scaledDiff = CMTimeConvertScale(diff, Int32(sampleRate), .RoundHalfAwayFromZero)
                            let silentAudioSampleBuffer = self.createSilentAudioSampleBufferWithFormatDescription(test,
                                                                                                                  numSamples: Int(scaledDiff.value),
                                                                                                                  presentationTime: audioBasePts)
                            audioInput!.appendSampleBuffer(silentAudioSampleBuffer!)
                        }
                        audioBasePts = videoBasePts
                    }
                    
                    if VideoMergeManagerPrintPts {
                        print("vc: \(videoBuffers)");
                        print("ac: \(audioBuffers)");
                        print("vb: \(String(format: "%.4f", CMTimeGetSeconds(videoBasePts)))")
                        print("ab: \(String(format: "%.4f", CMTimeGetSeconds(audioBasePts)))")
                        print("")
