Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: source/libvpx/test/y4m_test.cc

Issue 478033002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/test/vpxenc.sh ('k') | source/libvpx/third_party/libwebm/PATENTS.TXT » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/test/y4m_test.cc
===================================================================
--- source/libvpx/test/y4m_test.cc (revision 290053)
+++ source/libvpx/test/y4m_test.cc (working copy)
@@ -141,10 +141,18 @@
Y4mVideoWriteTest() {}
virtual ~Y4mVideoWriteTest() {
- CloseSource();
delete tmpfile_;
+ input_file_ = NULL;
}
+ void ReplaceInputFile(FILE *input_file) {
+ CloseSource();
+ frame_ = 0;
+ input_file_ = input_file;
+ rewind(input_file_);
+ ReadSourceToStart();
+ }
+
// Writes out a y4m file and then reads it back
void WriteY4mAndReadBack() {
ASSERT_TRUE(input_file_ != NULL);
@@ -163,8 +171,7 @@
write_image_file(img(), tmpfile_->file());
Next();
}
- tmpfile_->CloseFile();
- Y4mVideoSourceTest::Init(tmpfile_->file_name(), limit_);
+ ReplaceInputFile(tmpfile_->file());
}
virtual void Init(const std::string &file_name, int limit) {
« no previous file with comments | « source/libvpx/test/vpxenc.sh ('k') | source/libvpx/third_party/libwebm/PATENTS.TXT » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698