Hello,

einar's repo doesn't compile anymore using gcc 4.4:

../../cinelerra/yuvstream.C: In member function 'int
YUVStream::open_write(const char*, char*)':
../../cinelerra/yuvstream.C:85: error: invalid conversion from 'const
char*' to 'char*'
make[3]: *** [yuvstream.o] Error 1

According to http://gcc.gnu.org/gcc-4.4/porting_to.html const-ness is now
more strictly handled.

The attached patch should resolve that problem in yuvstream.[hC].

Simeon

diff --git a/cinelerra/yuvstream.C b/cinelerra/yuvstream.C
index e4244ca..1fb7936 100644
--- a/cinelerra/yuvstream.C
+++ b/cinelerra/yuvstream.C
@@ -77,12 +77,12 @@ int YUVStream::open_read(const char *path)
 }
 
 // NOTE: path is opened as a pipe if contains '|'
-int YUVStream::open_write(const char *path, char *pipe) 
+int YUVStream::open_write(const char *path, const char *pipe) 
 {
        if (pipe && *pipe)
        {
                // skip over the '|' if present
-               if (char *p = strchr(path, '|')) 
+               if (const char *p = strchr(path, '|')) 
                {
                        pipe = p + 1;
                }
diff --git a/cinelerra/yuvstream.h b/cinelerra/yuvstream.h
index 404e073..048bbb7 100644
--- a/cinelerra/yuvstream.h
+++ b/cinelerra/yuvstream.h
@@ -38,7 +38,7 @@ public:
        ~YUVStream();
 
        int open_read(const char *path);
-       int open_write(const char *path, char *pipe);
+       int open_write(const char *path, const char *pipe);
        void close_fd(); 
 
        int read_frame(uint8_t *yuv[3]);

Reply via email to