Fix fillBuffer method in decoder.