aboutsummaryrefslogtreecommitdiff
path: root/multimedia/vic/files/patch-ag
blob: c597e4f3e86b76126601830fcda27e188f8ae627 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
--- vw.cc.orig	Mon Jul 22 13:12:31 1996
+++ vw.cc	Tue Dec 17 16:35:57 1996
@@ -248,8 +248,6 @@
 	/*
 	 * Wrap segment in an ximage
 	 */
-	image_ = XCreateImage(dpy_, Tk_Visual(tk), Tk_Depth(tk), ZPixmap,
-			      0, (char*)0, width_, height_, 8, 0);
 	image_->obdata = (char*)&shminfo_;
 	image_->data = shminfo_.shmaddr;
 }
--- Tcl.h.orig	Sat Mar 16 13:14:34 1996
+++ Tcl.h	Tue Dec 17 14:39:45 1996
@@ -53,7 +53,8 @@
 	inline int dark() const { return (tcl_ == 0); }
 	inline Tcl_Interp* interp() const { return (tcl_); }
 	inline char* result() const { return (tcl_->result); }
-	inline void result(const char* p) { tcl_->result = (char*)p; }
+	inline void result(const char* p, Tcl_FreeProc* freeProc = TCL_STATIC)
+	    { Tcl_SetResult(tcl_, (char *)p, freeProc); }
 	void resultf(const char* fmt, ...);
 	inline void CreateCommand(const char* cmd, Tcl_CmdProc* cproc,
 				  ClientData cd = 0,
--- source.cc.orig	Thu Apr  4 07:05:45 1996
+++ source.cc	Tue Dec 17 14:38:44 1996
@@ -251,8 +251,7 @@
 			return (TCL_OK);
 		}
 		if (strcmp(argv[1], "addr") == 0) {
-			strcpy(wrk, InetNtoa(addr_));
-			tcl.result(wrk);
+			tcl.result(InetNtoa(addr_), TCL_DYNAMIC);
 			return (TCL_OK);
 		}
 		if (strcmp(argv[1], "srcid") == 0) {
--- Tcl.cc.orig	Tue Apr  2 20:53:27 1996
+++ Tcl.cc	Tue Dec 17 15:45:30 1996
@@ -65,6 +65,7 @@
 {
 	instance_.tcl_ = tcl;
 	instance_.application_ = application;
+	Tcl_Init(tcl);
 }
 
 void Tcl::evalc(const char* s)
@@ -162,6 +163,8 @@
 	Tcl& tcl = Tcl::instance();
 	if (!tcl.dark())
 		tcl.DeleteCommand(name_);
+	if (name_ != 0)
+		delete name_;
 	TclObject** p;
 	for (p = &all_; *p != this; p = &(*p)->next_)
 		;
@@ -197,8 +200,9 @@
 void TclObject::setproc(const char* s)
 {
 	Tcl& tcl = Tcl::instance();
-	if (name_ != 0 && !tcl.dark()) {
-		tcl.DeleteCommand(name_);
+	if (name_ != 0) {
+		if (!tcl.dark())
+			tcl.DeleteCommand(name_);
 		delete name_;
 	}
 	int n = strlen(s);
--- decoder.cc.orig	Wed Jun 26 17:28:40 1996
+++ decoder.cc	Tue Dec 17 15:55:42 1996
@@ -74,6 +74,8 @@
 
 Decoder::~Decoder()
 {
+	if (rvts_)
+		delete rvts_;
 }
 
 int Decoder::command(int argc, const char*const* argv)
--- encoder-h261.cc.orig	Mon Jul 22 13:12:53 1996
+++ encoder-h261.cc	Tue Dec 17 16:01:47 1996
@@ -118,6 +118,7 @@
 	void setq(int q);
     protected:
 	H261Encoder(int ft);
+	~H261Encoder();
 	int encode(const VideoFrame*, const u_int8_t *crvec);
 	int command(int argc, const char*const* argv);
 	void encode_blk(const short* blk, const char* lm);
@@ -211,6 +212,16 @@
 	}
 }
 
+H261Encoder::~H261Encoder()
+{
+	for (int q = 0; q < 32; ++q) {
+		if (llm_[q] != 0)
+			delete llm_[q];
+		if (clm_[q] != 0)
+			delete clm_[q];
+	}
+}
+
 H261PixelEncoder::H261PixelEncoder() : H261Encoder(FT_YUV_CIF)
 {
 	quant_required_ = 0;
@@ -631,7 +642,7 @@
 	if (q < 8) {
 		register int cmin = 0, cmax = 0;
 		register short* bp = lblk;
-		register i, j;
+		register int i, j;
 
 		// Y U and V blocks
 		for (i = 6; --i >= 0; ) {