[x265] [PATCH] input: initialize the input buffer (buf) pointer

Gopu Govindaswamy gopu at multicorewareinc.com
Fri Oct 25 09:37:53 CEST 2013


# HG changeset patch
# User Gopu Govindaswamy <gopu at multicorewareinc.com>
# Date 1382686661 -19800
# Node ID 5b0cf1b805fa14b52700c1ec3f1ce1ce4e2c95a6
# Parent  f93a9c2e6df892c358a6df2dc99ee3a8cb897837
input: initialize the input buffer (buf) pointer

diff -r f93a9c2e6df8 -r 5b0cf1b805fa source/input/y4m.cpp
--- a/source/input/y4m.cpp	Fri Oct 25 12:46:38 2013 +0530
+++ b/source/input/y4m.cpp	Fri Oct 25 13:07:41 2013 +0530
@@ -32,6 +32,14 @@
 
 Y4MInput::Y4MInput(const char *filename)
 {
+
+#if defined ENABLE_THREAD
+    for (int i = 0; i < QUEUE_SIZE; i++)
+        buf[i] = NULL;
+#else
+    buf = NULL;
+#endif
+
     ifs.open(filename, ios::binary | ios::in);
     threadActive = false;
     if (!ifs.fail())
diff -r f93a9c2e6df8 -r 5b0cf1b805fa source/input/yuv.cpp
--- a/source/input/yuv.cpp	Fri Oct 25 12:46:38 2013 +0530
+++ b/source/input/yuv.cpp	Fri Oct 25 13:07:41 2013 +0530
@@ -33,6 +33,14 @@
 
 YUVInput::YUVInput(const char *filename)
 {
+
+#if defined ENABLE_THREAD
+    for (int i = 0; i < QUEUE_SIZE; i++)
+        buf[i] = NULL;
+#else
+    buf = NULL;
+#endif
+
     ifs = NULL;
     if (!strcmp(filename, "-"))
         ifs = &cin;


More information about the x265-devel mailing list