check for decoder.end