diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-04 14:05:12 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-04 14:05:12 +0000 |
commit | 3bacd4082e2d3a2dd5b8b13635df956aa4f415cd (patch) | |
tree | dd3bc244b8a45aacb932109dc8c12d1f21769d55 /formats/format_h264.c | |
parent | 1d3ce2ae5f81e30ec0704efe840bc2c9a24c7e8a (diff) |
Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@227580 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'formats/format_h264.c')
-rw-r--r-- | formats/format_h264.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/formats/format_h264.c b/formats/format_h264.c index fa938a8c6..1fbad01ba 100644 --- a/formats/format_h264.c +++ b/formats/format_h264.c @@ -72,7 +72,7 @@ static struct ast_frame *h264_read(struct ast_filestream *s, int *whennext) len = BUF_SIZE; /* XXX truncate */ } s->fr.frametype = AST_FRAME_VIDEO; - s->fr.subclass = AST_FORMAT_H264; + s->fr.subclass.codec = 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.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) { @@ -82,7 +82,7 @@ static struct ast_frame *h264_read(struct ast_filestream *s, int *whennext) } s->fr.samples = fs->lastts; 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)) { @@ -104,9 +104,9 @@ static int h264_write(struct ast_filestream *s, struct ast_frame *f) ast_log(LOG_WARNING, "Asked to write non-video frame!\n"); return -1; } - mark = (f->subclass & 0x1) ? 0x8000 : 0; - if ((f->subclass & ~0x1) != AST_FORMAT_H264) { - ast_log(LOG_WARNING, "Asked to write non-h264 frame (%d)!\n", f->subclass); + mark = (f->subclass.codec & 0x1) ? 0x8000 : 0; + if ((f->subclass.codec & ~0x1) != AST_FORMAT_H264) { + ast_log(LOG_WARNING, "Asked to write non-h264 frame (%s)!\n", ast_getformatname(f->subclass.codec)); return -1; } ts = htonl(f->samples); |