[svn-commits] rizzo: trunk r126308 - in /trunk/channels: console_video.c vcodecs.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Jun 29 07:46:00 CDT 2008


Author: rizzo
Date: Sun Jun 29 07:45:59 2008
New Revision: 126308

URL: http://svn.digium.com/view/asterisk?view=rev&rev=126308
Log:
make this compile after ast_frame's data field changed to a union

Modified:
    trunk/channels/console_video.c
    trunk/channels/vcodecs.c

Modified: trunk/channels/console_video.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/console_video.c?view=diff&rev=126308&r1=126307&r2=126308
==============================================================================
--- trunk/channels/console_video.c (original)
+++ trunk/channels/console_video.c Sun Jun 29 07:45:59 2008
@@ -608,11 +608,11 @@
 	}
 	v->next_seq++;
 
-	if (f->data == NULL || f->datalen < 2) {
+	if (f->data.ptr == NULL || f->datalen < 2) {
 		ast_log(LOG_WARNING, "empty video frame, discard\n");
 		return 0;
 	}
-	if (v->d_callbacks->dec_decap(v->dec_in_cur, f->data, f->datalen)) {
+	if (v->d_callbacks->dec_decap(v->dec_in_cur, f->data.ptr, f->datalen)) {
 		ast_log(LOG_WARNING, "error in dec_decap, enter discard\n");
 		v->discard = 1;
 	}

Modified: trunk/channels/vcodecs.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/vcodecs.c?view=diff&rev=126308&r1=126307&r2=126308
==============================================================================
--- trunk/channels/vcodecs.c (original)
+++ trunk/channels/vcodecs.c Sun Jun 29 07:45:59 2008
@@ -240,7 +240,7 @@
 		return NULL;
 	}
 	memcpy(data+head, start, len);
-	f->data = data;
+	f->data.ptr = data;
 	f->mallocd = AST_MALLOCD_DATA | AST_MALLOCD_HDR;
 	//f->has_timing_info = 1;
 	//f->ts = ast_tvdiff_ms(ast_tvnow(), out->ts);
@@ -393,7 +393,7 @@
 		if (!f)
 			break;
 
-		data = f->data;
+		data = f->data.ptr;
 		if (h == 0) {	/* we start with a psc */
 			data[0] |= 0x04;	// set P == 1, and we are done
 		} else {	/* no psc, create a header */
@@ -647,7 +647,7 @@
 
 		if (!f)
 			break;
-		bcopy(h, f->data, 4);	/* copy the h263 header */
+		bcopy(h, f->data.ptr, 4);	/* copy the h263 header */
 		/* XXX to do: if not aligned, fix sbit and ebit,
 		 * then move i back by 1 for the next frame
 		 */
@@ -801,7 +801,7 @@
 			break;
 		/* recompute header with I=0, V=1 */
 		h[0] = ( (sbit & 7) << 5 ) | ( (ebit & 7) << 2 ) | 1;
-		bcopy(h, f->data, 4);	/* copy the h261 header */
+		bcopy(h, f->data.ptr, 4);	/* copy the h261 header */
 		if (ebit)	/* not aligned, restart from previous byte */
 			i--;
 		sbit = (8 - ebit) & 7;
@@ -1021,7 +1021,7 @@
 		size -= frag_size;	/* skip this data block */
 		start += frag_size;
 
-		data = f->data;
+		data = f->data.ptr;
 		data[0] = hdr[0];
 		data[1] = hdr[1] | (size == 0 ? 0x40 : 0);	/* end bit if we are done */
 		hdr[1] &= ~0x80;	/* clear start bit for subsequent frames */




More information about the svn-commits mailing list