Fixed decoding of streams containing only one frame (#1).
Fixed case where worker was terminated before last callback has been executed.