pthreads: reset got_frames on flush.