VideoCommon: rewrite frame skipping code
Merge pull request #957 from degasus/frame_skipping

VideoCommon: rewrite frame skipping code