From 0b2f1b3f45aa11cf161c922da49ce30fe588ecd1 Mon Sep 17 00:00:00 2001 From: fengjiayi Date: Tue, 20 Mar 2018 20:51:29 +0800 Subject: [PATCH] clear stream during Scanner::Reset() --- paddle/fluid/recordio/scanner.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/paddle/fluid/recordio/scanner.cc b/paddle/fluid/recordio/scanner.cc index d842f8fe5a..c22281dc97 100644 --- a/paddle/fluid/recordio/scanner.cc +++ b/paddle/fluid/recordio/scanner.cc @@ -28,6 +28,7 @@ Scanner::Scanner(const std::string &filename) { } void Scanner::Reset() { + stream_->clear(); stream_->seekg(0, std::ios::beg); ParseNextChunk(); } -- GitLab