Merge pull request #4 from gfto/fixes

Crash fixes and removal if deprecated libav feature.