Windows 7 comes bundled with decoders for several video formats, including H.264 and Xvid. These decoders from Microsoft are used by default by most DirectShow applications, including Windows Media Player and Media Center.
If you prefer using LAV Video decoder, ffdshow, or some other third party decoder, then you can use Codec Tweak Tool to adjust the preferred decoder settings in Windows 7. This tool is included with the K-Lite Codec Pack and is also available as a standalone application.
The K-Lite Codec Pack automatically adjusts the preferred codecs settings for the most common video formats. It uses specials settings to make Windows select the decoder based on the filter merit. This is similar to how things work on older Windows versions.
Sometimes it is also needed to disable the Microsoft audio and video decoders.
The Microsoft players use the new Media Foundation playback framework for playing certain file types, such as AVI, MP4, M4V, MOV, M2TS, and WMV. To force the use of DirectShow filters, you may also need to disable Media Foundation with the Codec tweak Tool.