diff options
Diffstat (limited to 'formats/format_h263.c')
-rw-r--r-- | formats/format_h263.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/formats/format_h263.c b/formats/format_h263.c index 9b6ac6764..13377f4ed 100644 --- a/formats/format_h263.c +++ b/formats/format_h263.c @@ -64,7 +64,7 @@ static int h263_open(struct ast_filestream *s) static struct ast_frame *h263_read(struct ast_filestream *s, int *whennext) { int res; - int mark; + format_t mark; unsigned short len; unsigned int ts; struct h263_desc *fs = (struct h263_desc *)s->_private; @@ -80,7 +80,7 @@ static struct ast_frame *h263_read(struct ast_filestream *s, int *whennext) return NULL; } s->fr.frametype = AST_FRAME_VIDEO; - s->fr.subclass = AST_FORMAT_H263; + s->fr.subclass.codec = 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.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) { @@ -90,7 +90,7 @@ static struct ast_frame *h263_read(struct ast_filestream *s, int *whennext) } s->fr.samples = fs->lastts; /* XXX what ? */ s->fr.datalen = len; - s->fr.subclass |= mark; + s->fr.subclass.codec |= mark; s->fr.delivery.tv_sec = 0; s->fr.delivery.tv_usec = 0; if ((res = fread(&ts, 1, sizeof(ts), s->f)) == sizeof(ts)) { @@ -106,18 +106,18 @@ static int h263_write(struct ast_filestream *fs, struct ast_frame *f) int res; unsigned int ts; unsigned short len; - int subclass; - int mark=0; + format_t subclass; + format_t mark=0; if (f->frametype != AST_FRAME_VIDEO) { ast_log(LOG_WARNING, "Asked to write non-video frame!\n"); return -1; } - subclass = f->subclass; + subclass = f->subclass.codec; if (subclass & 0x1) mark=0x8000; subclass &= ~0x1; if (subclass != AST_FORMAT_H263) { - ast_log(LOG_WARNING, "Asked to write non-h263 frame (%d)!\n", f->subclass); + ast_log(LOG_WARNING, "Asked to write non-h263 frame (%s)!\n", ast_getformatname(f->subclass.codec)); return -1; } ts = htonl(f->samples); |