Update ffdecode.c to work with newer libav.

This gets rid of deprecation warnings when building ffdecode.c, and
adds a dependency on the avsample library.