From 2d6c021bfc54c69563c72ba1eb1b8c11fbf10bf5 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Mon, 11 Apr 2022 06:53:36 +0300
Subject: [PATCH 77/78] HIGHLY EXPERIMENTAL: constify png_data

---
 cinelerra-5.1/guicast/vframe.C | 4 ++--
 cinelerra-5.1/guicast/vframe.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cinelerra-5.1/guicast/vframe.C b/cinelerra-5.1/guicast/vframe.C
index f2283285..c6a35712 100644
--- a/cinelerra-5.1/guicast/vframe.C
+++ b/cinelerra-5.1/guicast/vframe.C
@@ -76,7 +76,7 @@ VFrameScene::~VFrameScene()
 
 //static BCCounter counter;
 
-VFramePng::VFramePng(unsigned char *png_data, double s)
+VFramePng::VFramePng(const unsigned char *png_data, double s)
 {
 	long image_size =
 		((long)png_data[0] << 24) | ((long)png_data[1] << 16) |
@@ -85,7 +85,7 @@ VFramePng::VFramePng(unsigned char *png_data, double s)
 	read_png(png_data+4, image_size, s, s);
 }
 
-VFramePng::VFramePng(unsigned char *png_data, long image_size, double xs, double ys)
+VFramePng::VFramePng(const unsigned char *png_data, long image_size, double xs, double ys)
 {
 	if( !xs ) xs = BC_WindowBase::get_resources()->icon_scale;
 	if( !ys ) ys = BC_WindowBase::get_resources()->icon_scale;
diff --git a/cinelerra-5.1/guicast/vframe.h b/cinelerra-5.1/guicast/vframe.h
index dc907821..e5e88b24 100644
--- a/cinelerra-5.1/guicast/vframe.h
+++ b/cinelerra-5.1/guicast/vframe.h
@@ -480,8 +480,8 @@ class VFramePng : public VFrame {
 // Read a PNG into the frame with alpha
 	int read_png(const unsigned char *data, long image_size, double xscale, double yscale);
 public:
-	VFramePng(unsigned char *png_data, double s=0);
-	VFramePng(unsigned char *png_data, long image_size, double xs=0, double ys=0);
+	VFramePng(const unsigned char *png_data, double s=0);
+	VFramePng(const unsigned char *png_data, long image_size, double xs=0, double ys=0);
 	~VFramePng();
 	static VFrame *vframe_png(int fd, double xs=1, double ys=1);
 	static VFrame *vframe_png(const char *png_path, double xs=1, double ys=1);
-- 
2.35.1

