Fix some error handling in mod_libavcodec. Still crashes though.