In the past video restoration algorithms using exemplar-based method, the exhaustive strategy of searching for the best matching patch is always used, which makes the computation very heavy. Moreover the accumulated matching error easily leads the wrong information spread. So a novel fast video inpainting algorithm is proposed in this paper. When restoring the damaged background, the information is directly replicated to fill in the damaged region from the constructed panoramic background image. When restoring the damaged foreground, it seeks a best state matching frame by comparing the adjacent running foreground state of the damaged frame, and searches the best matching patch in this frame. Meanwhile, the algorithm also improves the way of searching exemplar patch, principle of matching cost and way of confidence term updating. Experimental results show that the proposed algorithm is suitable for video with stationary background and periodical running foreground, having better efficiency and restoration effects.