fixed error calls with non-constant pointers; fixed decoding by flushing codec cache