[svn-commits] mvanbaak: branch mvanbaak/ast_frame_dataunion r117249 - /team/mvanbaak/ast_fr...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon May 19 17:19:07 CDT 2008


Author: mvanbaak
Date: Mon May 19 17:19:06 2008
New Revision: 117249

URL: http://svn.digium.com/view/asterisk?view=rev&rev=117249
Log:
make formats/ compile

Modified:
    team/mvanbaak/ast_frame_dataunion/formats/format_g723.c
    team/mvanbaak/ast_frame_dataunion/formats/format_g726.c
    team/mvanbaak/ast_frame_dataunion/formats/format_g729.c
    team/mvanbaak/ast_frame_dataunion/formats/format_gsm.c
    team/mvanbaak/ast_frame_dataunion/formats/format_h263.c
    team/mvanbaak/ast_frame_dataunion/formats/format_h264.c
    team/mvanbaak/ast_frame_dataunion/formats/format_ilbc.c
    team/mvanbaak/ast_frame_dataunion/formats/format_jpeg.c
    team/mvanbaak/ast_frame_dataunion/formats/format_pcm.c
    team/mvanbaak/ast_frame_dataunion/formats/format_sln.c
    team/mvanbaak/ast_frame_dataunion/formats/format_sln16.c
    team/mvanbaak/ast_frame_dataunion/formats/format_vox.c
    team/mvanbaak/ast_frame_dataunion/formats/format_wav.c
    team/mvanbaak/ast_frame_dataunion/formats/format_wav_gsm.c

Modified: team/mvanbaak/ast_frame_dataunion/formats/format_g723.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/formats/format_g723.c?view=diff&rev=117249&r1=117248&r2=117249
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/formats/format_g723.c (original)
+++ team/mvanbaak/ast_frame_dataunion/formats/format_g723.c Mon May 19 17:19:06 2008
@@ -64,7 +64,7 @@
 	s->fr.subclass = AST_FORMAT_G723_1;
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, size);
-	if ((res = fread(s->fr.data, 1, s->fr.datalen, s->f)) != size) {
+	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != size) {
 		ast_log(LOG_WARNING, "Short read (%d of %d bytes) (%s)!\n", res, size, strerror(errno));
 		return NULL;
 	}
@@ -100,7 +100,7 @@
 		ast_log(LOG_WARNING, "Unable to write size: res=%d (%s)\n", res, strerror(errno));
 		return -1;
 	}
-	if ((res = fwrite(f->data, 1, f->datalen, s->f)) != f->datalen) {
+	if ((res = fwrite(f->data.ptr, 1, f->datalen, s->f)) != f->datalen) {
 		ast_log(LOG_WARNING, "Unable to write frame: res=%d (%s)\n", res, strerror(errno));
 		return -1;
 	}	

Modified: team/mvanbaak/ast_frame_dataunion/formats/format_g726.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/formats/format_g726.c?view=diff&rev=117249&r1=117248&r2=117249
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/formats/format_g726.c (original)
+++ team/mvanbaak/ast_frame_dataunion/formats/format_g726.c Mon May 19 17:19:06 2008
@@ -123,7 +123,7 @@
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, frame_size[fs->rate]);
 	s->fr.samples = 8 * FRAME_TIME;
-	if ((res = fread(s->fr.data, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
+	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
 		if (res)
 			ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", res, strerror(errno));
 		return NULL;
@@ -151,7 +151,7 @@
 						f->datalen, frame_size[fs->rate]);
 		return -1;
 	}
-	if ((res = fwrite(f->data, 1, f->datalen, s->f)) != f->datalen) {
+	if ((res = fwrite(f->data.ptr, 1, f->datalen, s->f)) != f->datalen) {
 		ast_log(LOG_WARNING, "Bad write (%d/%d): %s\n", 
 				res, frame_size[fs->rate], strerror(errno));
 			return -1;

Modified: team/mvanbaak/ast_frame_dataunion/formats/format_g729.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/formats/format_g729.c?view=diff&rev=117249&r1=117248&r2=117249
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/formats/format_g729.c (original)
+++ team/mvanbaak/ast_frame_dataunion/formats/format_g729.c Mon May 19 17:19:06 2008
@@ -50,7 +50,7 @@
 	s->fr.mallocd = 0;
 	s->fr.samples = G729A_SAMPLES;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, BUF_SIZE);
-	if ((res = fread(s->fr.data, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
+	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
 		if (res && (res != 10))	/* XXX what for ? */
 			ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", res, strerror(errno));
 		return NULL;
@@ -74,7 +74,7 @@
 		ast_log(LOG_WARNING, "Invalid data length, %d, should be multiple of 10\n", f->datalen);
 		return -1;
 	}
-	if ((res = fwrite(f->data, 1, f->datalen, fs->f)) != f->datalen) {
+	if ((res = fwrite(f->data.ptr, 1, f->datalen, fs->f)) != f->datalen) {
 			ast_log(LOG_WARNING, "Bad write (%d/10): %s\n", res, strerror(errno));
 			return -1;
 	}

Modified: team/mvanbaak/ast_frame_dataunion/formats/format_gsm.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/formats/format_gsm.c?view=diff&rev=117249&r1=117248&r2=117249
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/formats/format_gsm.c (original)
+++ team/mvanbaak/ast_frame_dataunion/formats/format_gsm.c Mon May 19 17:19:06 2008
@@ -56,7 +56,7 @@
 	s->fr.subclass = AST_FORMAT_GSM;
 	AST_FRAME_SET_BUFFER(&(s->fr), s->buf, AST_FRIENDLY_OFFSET, GSM_FRAME_SIZE)
 	s->fr.mallocd = 0;
-	if ((res = fread(s->fr.data, 1, GSM_FRAME_SIZE, s->f)) != GSM_FRAME_SIZE) {
+	if ((res = fread(s->fr.data.ptr, 1, GSM_FRAME_SIZE, s->f)) != GSM_FRAME_SIZE) {
 		if (res)
 			ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", res, strerror(errno));
 		return NULL;
@@ -82,7 +82,7 @@
 		/* This is in MSGSM format, need to be converted */
 		int len=0;
 		while(len < f->datalen) {
-			conv65(f->data + len, gsm);
+			conv65(f->data.ptr + len, gsm);
 			if ((res = fwrite(gsm, 1, 2*GSM_FRAME_SIZE, fs->f)) != 2*GSM_FRAME_SIZE) {
 				ast_log(LOG_WARNING, "Bad write (%d/66): %s\n", res, strerror(errno));
 				return -1;
@@ -94,7 +94,7 @@
 			ast_log(LOG_WARNING, "Invalid data length, %d, should be multiple of 33\n", f->datalen);
 			return -1;
 		}
-		if ((res = fwrite(f->data, 1, f->datalen, fs->f)) != f->datalen) {
+		if ((res = fwrite(f->data.ptr, 1, f->datalen, fs->f)) != f->datalen) {
 				ast_log(LOG_WARNING, "Bad write (%d/33): %s\n", res, strerror(errno));
 				return -1;
 		}

Modified: team/mvanbaak/ast_frame_dataunion/formats/format_h263.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/formats/format_h263.c?view=diff&rev=117249&r1=117248&r2=117249
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/formats/format_h263.c (original)
+++ team/mvanbaak/ast_frame_dataunion/formats/format_h263.c Mon May 19 17:19:06 2008
@@ -83,7 +83,7 @@
 	s->fr.subclass = AST_FORMAT_H263;
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, len);
-	if ((res = fread(s->fr.data, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
+	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
 		if (res)
 			ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", res, strerror(errno));
 		return NULL;
@@ -130,7 +130,7 @@
 			ast_log(LOG_WARNING, "Bad write (%d/2): %s\n", res, strerror(errno));
 			return -1;
 	}
-	if ((res = fwrite(f->data, 1, f->datalen, fs->f)) != f->datalen) {
+	if ((res = fwrite(f->data.ptr, 1, f->datalen, fs->f)) != f->datalen) {
 			ast_log(LOG_WARNING, "Bad write (%d/%d): %s\n", res, f->datalen, strerror(errno));
 			return -1;
 	}

Modified: team/mvanbaak/ast_frame_dataunion/formats/format_h264.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/formats/format_h264.c?view=diff&rev=117249&r1=117248&r2=117249
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/formats/format_h264.c (original)
+++ team/mvanbaak/ast_frame_dataunion/formats/format_h264.c Mon May 19 17:19:06 2008
@@ -75,7 +75,7 @@
 	s->fr.subclass = AST_FORMAT_H264;
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, len);
-	if ((res = fread(s->fr.data, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
+	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
 		if (res)
 			ast_log(LOG_WARNING, "Short read (%d of %d) (%s)!\n", res, len, strerror(errno));
 		return NULL;
@@ -119,7 +119,7 @@
 		ast_log(LOG_WARNING, "Bad write (%d/2): %s\n", res, strerror(errno));
 		return -1;
 	}
-	if ((res = fwrite(f->data, 1, f->datalen, s->f)) != f->datalen) {
+	if ((res = fwrite(f->data.ptr, 1, f->datalen, s->f)) != f->datalen) {
 		ast_log(LOG_WARNING, "Bad write (%d/%d): %s\n", res, f->datalen, strerror(errno));
 		return -1;
 	}

Modified: team/mvanbaak/ast_frame_dataunion/formats/format_ilbc.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/formats/format_ilbc.c?view=diff&rev=117249&r1=117248&r2=117249
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/formats/format_ilbc.c (original)
+++ team/mvanbaak/ast_frame_dataunion/formats/format_ilbc.c Mon May 19 17:19:06 2008
@@ -48,7 +48,7 @@
 	s->fr.subclass = AST_FORMAT_ILBC;
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, ILBC_BUF_SIZE);
-	if ((res = fread(s->fr.data, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
+	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
 		if (res)
 			ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", res, strerror(errno));
 		return NULL;
@@ -72,7 +72,7 @@
 		ast_log(LOG_WARNING, "Invalid data length, %d, should be multiple of 50\n", f->datalen);
 		return -1;
 	}
-	if ((res = fwrite(f->data, 1, f->datalen, fs->f)) != f->datalen) {
+	if ((res = fwrite(f->data.ptr, 1, f->datalen, fs->f)) != f->datalen) {
 			ast_log(LOG_WARNING, "Bad write (%d/50): %s\n", res, strerror(errno));
 			return -1;
 	}

Modified: team/mvanbaak/ast_frame_dataunion/formats/format_jpeg.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/formats/format_jpeg.c?view=diff&rev=117249&r1=117248&r2=117249
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/formats/format_jpeg.c (original)
+++ team/mvanbaak/ast_frame_dataunion/formats/format_jpeg.c Mon May 19 17:19:06 2008
@@ -49,7 +49,7 @@
 	memset(&fr, 0, sizeof(fr));
 	fr.frametype = AST_FRAME_IMAGE;
 	fr.subclass = AST_FORMAT_JPEG;
-	fr.data = buf;
+	fr.data.ptr = buf;
 	fr.src = "JPEG Read";
 	fr.datalen = len;
 	return ast_frisolate(&fr);
@@ -79,7 +79,7 @@
 		return -1;
 	}
 	if (fr->datalen) {
-		res = write(fd, fr->data, fr->datalen);
+		res = write(fd, fr->data.ptr, fr->datalen);
 		if (res != fr->datalen) {
 			ast_log(LOG_WARNING, "Only wrote %d of %d bytes: %s\n", res, fr->datalen, strerror(errno));
 			return -1;

Modified: team/mvanbaak/ast_frame_dataunion/formats/format_pcm.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/formats/format_pcm.c?view=diff&rev=117249&r1=117248&r2=117249
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/formats/format_pcm.c (original)
+++ team/mvanbaak/ast_frame_dataunion/formats/format_pcm.c Mon May 19 17:19:06 2008
@@ -83,7 +83,7 @@
 	s->fr.subclass = s->fmt->format;
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, BUF_SIZE);
-	if ((res = fread(s->fr.data, 1, s->fr.datalen, s->f)) < 1) {
+	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) < 1) {
 		if (res)
 			ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", res, strerror(errno));
 		return NULL;
@@ -209,7 +209,7 @@
 	}
 #endif	/* REALTIME_WRITE */
 	
-	if ((res = fwrite(f->data, 1, f->datalen, fs->f)) != f->datalen) {
+	if ((res = fwrite(f->data.ptr, 1, f->datalen, fs->f)) != f->datalen) {
 		ast_log(LOG_WARNING, "Bad write (%d/%d): %s\n", res, f->datalen, strerror(errno));
 		return -1;
 	}

Modified: team/mvanbaak/ast_frame_dataunion/formats/format_sln.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/formats/format_sln.c?view=diff&rev=117249&r1=117248&r2=117249
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/formats/format_sln.c (original)
+++ team/mvanbaak/ast_frame_dataunion/formats/format_sln.c Mon May 19 17:19:06 2008
@@ -42,7 +42,7 @@
 	s->fr.subclass = AST_FORMAT_SLINEAR;
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, BUF_SIZE);
-	if ((res = fread(s->fr.data, 1, s->fr.datalen, s->f)) < 1) {
+	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) < 1) {
 		if (res)
 			ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", res, strerror(errno));
 		return NULL;
@@ -63,7 +63,7 @@
 		ast_log(LOG_WARNING, "Asked to write non-slinear frame (%d)!\n", f->subclass);
 		return -1;
 	}
-	if ((res = fwrite(f->data, 1, f->datalen, fs->f)) != f->datalen) {
+	if ((res = fwrite(f->data.ptr, 1, f->datalen, fs->f)) != f->datalen) {
 			ast_log(LOG_WARNING, "Bad write (%d/%d): %s\n", res, f->datalen, strerror(errno));
 			return -1;
 	}

Modified: team/mvanbaak/ast_frame_dataunion/formats/format_sln16.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/formats/format_sln16.c?view=diff&rev=117249&r1=117248&r2=117249
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/formats/format_sln16.c (original)
+++ team/mvanbaak/ast_frame_dataunion/formats/format_sln16.c Mon May 19 17:19:06 2008
@@ -43,7 +43,7 @@
 	s->fr.subclass = AST_FORMAT_SLINEAR16;
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, BUF_SIZE);
-	if ((res = fread(s->fr.data, 1, s->fr.datalen, s->f)) < 1) {
+	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) < 1) {
 		if (res)
 			ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", res, strerror(errno));
 		return NULL;
@@ -65,7 +65,7 @@
 		ast_log(LOG_WARNING, "Asked to write non-slinear16 frame (%d)!\n", f->subclass);
 		return -1;
 	}
-	if ((res = fwrite(f->data, 1, f->datalen, fs->f)) != f->datalen) {
+	if ((res = fwrite(f->data.ptr, 1, f->datalen, fs->f)) != f->datalen) {
 		ast_log(LOG_WARNING, "Bad write (%d/%d): %s\n", res, f->datalen, strerror(errno));
 		return -1;
 	}

Modified: team/mvanbaak/ast_frame_dataunion/formats/format_vox.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/formats/format_vox.c?view=diff&rev=117249&r1=117248&r2=117249
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/formats/format_vox.c (original)
+++ team/mvanbaak/ast_frame_dataunion/formats/format_vox.c Mon May 19 17:19:06 2008
@@ -44,7 +44,7 @@
 	s->fr.subclass = AST_FORMAT_ADPCM;
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, BUF_SIZE);
-	if ((res = fread(s->fr.data, 1, s->fr.datalen, s->f)) < 1) {
+	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) < 1) {
 		if (res)
 			ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", res, strerror(errno));
 		return NULL;
@@ -65,7 +65,7 @@
 		ast_log(LOG_WARNING, "Asked to write non-ADPCM frame (%d)!\n", f->subclass);
 		return -1;
 	}
-	if ((res = fwrite(f->data, 1, f->datalen, s->f)) != f->datalen) {
+	if ((res = fwrite(f->data.ptr, 1, f->datalen, s->f)) != f->datalen) {
 			ast_log(LOG_WARNING, "Bad write (%d/%d): %s\n", res, f->datalen, strerror(errno));
 			return -1;
 	}

Modified: team/mvanbaak/ast_frame_dataunion/formats/format_wav.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/formats/format_wav.c?view=diff&rev=117249&r1=117248&r2=117249
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/formats/format_wav.c (original)
+++ team/mvanbaak/ast_frame_dataunion/formats/format_wav.c Mon May 19 17:19:06 2008
@@ -362,7 +362,7 @@
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, bytes);
 	
-	if ( (res = fread(s->fr.data, 1, s->fr.datalen, s->f)) <= 0 ) {
+	if ( (res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) <= 0 ) {
 		if (res)
 			ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", res, strerror(errno));
 		return NULL;
@@ -370,7 +370,7 @@
 	s->fr.datalen = res;
 	s->fr.samples = samples = res / 2;
 
-	tmp = (short *)(s->fr.data);
+	tmp = (short *)(s->fr.data.ptr);
 #if __BYTE_ORDER == __BIG_ENDIAN
 	/* file format is little endian so we need to swap */
 	for( x = 0; x < samples; x++)
@@ -407,14 +407,14 @@
 		ast_log(LOG_WARNING, "Data length is too long\n");
 		return -1;
 	}
-	tmpi = f->data;
+	tmpi = f->data.ptr;
 	for (x=0; x < f->datalen/2; x++) 
 		tmp[x] = (tmpi[x] << 8) | ((tmpi[x] & 0xff00) >> 8);
 
 	if ((res = fwrite(tmp, 1, f->datalen, fs->f)) != f->datalen ) {
 #else
 	/* just write */
-	if ((res = fwrite(f->data, 1, f->datalen, fs->f)) != f->datalen ) {
+	if ((res = fwrite(f->data.ptr, 1, f->datalen, fs->f)) != f->datalen ) {
 #endif
 		ast_log(LOG_WARNING, "Bad write (%d): %s\n", res, strerror(errno));
 		return -1;

Modified: team/mvanbaak/ast_frame_dataunion/formats/format_wav_gsm.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/formats/format_wav_gsm.c?view=diff&rev=117249&r1=117248&r2=117249
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/formats/format_wav_gsm.c (original)
+++ team/mvanbaak/ast_frame_dataunion/formats/format_wav_gsm.c Mon May 19 17:19:06 2008
@@ -402,7 +402,7 @@
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, GSM_FRAME_SIZE);
 	if (fs->secondhalf) {
 		/* Just return a frame based on the second GSM frame */
-		s->fr.data = (char *)s->fr.data + GSM_FRAME_SIZE;
+		s->fr.data.ptr = (char *)s->fr.data.ptr + GSM_FRAME_SIZE;
 		s->fr.offset += GSM_FRAME_SIZE;
 	} else {
 		/* read and convert */
@@ -415,7 +415,7 @@
 			return NULL;
 		}
 		/* Convert from MS format to two real GSM frames */
-		conv65(msdata, s->fr.data);
+		conv65(msdata, s->fr.data.ptr);
 	}
 	fs->secondhalf = !fs->secondhalf;
 	*whennext = GSM_SAMPLES;
@@ -449,16 +449,16 @@
 		int res;
 		unsigned char *src, msdata[MSGSM_FRAME_SIZE];
 		if (fs->secondhalf) {	/* second half of raw gsm to be converted */
-			memcpy(s->buf + GSM_FRAME_SIZE, f->data + len, GSM_FRAME_SIZE);
+			memcpy(s->buf + GSM_FRAME_SIZE, f->data.ptr + len, GSM_FRAME_SIZE);
 			conv66((unsigned char *) s->buf, msdata);
 			src = msdata;
 			fs->secondhalf = 0;
 		} else if (size == GSM_FRAME_SIZE) {	/* first half of raw gsm */
-			memcpy(s->buf, f->data + len, GSM_FRAME_SIZE);
+			memcpy(s->buf, f->data.ptr + len, GSM_FRAME_SIZE);
 			src = NULL;	/* nothing to write */
 			fs->secondhalf = 1;
 		} else {	/* raw msgsm data */
-			src = f->data + len;
+			src = f->data.ptr + len;
 		}
 		if (src && (res = fwrite(src, 1, MSGSM_FRAME_SIZE, s->f)) != MSGSM_FRAME_SIZE) {
 			ast_log(LOG_WARNING, "Bad write (%d/65): %s\n", res, strerror(errno));




More information about the svn-commits mailing list