make this compile after ast_frame's data field changed to a union

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.1
Luigi Rizzo 17 years ago
parent 044a7b945f
commit e6f17e50c4

@ -608,11 +608,11 @@ int console_write_video(struct ast_channel *chan, struct ast_frame *f)
}
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;
}

@ -240,7 +240,7 @@ static struct ast_frame *create_video_frame(uint8_t *start, uint8_t *end,
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 @@ static struct ast_frame *h263p_encap(struct fbuf_t *b, int mtu,
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 @@ static struct ast_frame *h263_encap(struct fbuf_t *b, int mtu,
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 @@ static struct ast_frame *h261_encap(struct fbuf_t *b, int mtu,
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 @@ static struct ast_frame *h264_encap(struct fbuf_t *b, int mtu,
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 */

Loading…
Cancel
Save