xbmc/xbmc — pull request #534 by CrystalP (2011-11-12 01:02:06+00:00)
Title: [DXVA] Fix "blocky" artifacts after skip with nVidia cards

The nVidia cards sometimes need time before they can start decoding a new frame and return E_PENDING when not ready.

This frequently happens after skipping or when the computer is busy and results in "blocking" artifacts/"pixellation" as frames that failed to decode are used as refs for later frames.

Helps things a lot with my G210, no more "Failed to begin frame" logged by ffmpeg for no good reason.
Once I found the issue, I took inspiration from MPC-HC and ffdshow for a fix. They wait up to a full second though, I'm not sure we want to do that.