Mercurial > libavformat.hg
changeset 135:56590088f801 libavformat
truncated h263 decoding support / H263-ES "demuxer"
author | michaelni |
---|---|
date | Thu, 22 May 2003 14:12:22 +0000 |
parents | 5cda954c6e9a |
children | 6b74809d2496 |
files | raw.c |
diffstat | 1 files changed, 29 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/raw.c Wed May 14 11:40:16 2003 +0000 +++ b/raw.c Thu May 22 14:12:22 2003 +0000 @@ -208,6 +208,22 @@ return 0; } +static int h263_probe(AVProbeData *p) +{ + int code; + const uint8_t *d; + + if (p->buf_size < 6) + return 0; + d = p->buf; + code = (d[0] << 14) | (d[1] << 6) | (d[2] >> 2); + if (code == 0x20) { + return 50; + } + return 0; +} + + AVInputFormat mp3_iformat = { "mp3", "MPEG audio", @@ -275,6 +291,18 @@ raw_write_trailer, }; +AVInputFormat h263_iformat = { + "h263", + "raw h263", + 0, + h263_probe, + video_read_header, + raw_read_packet, + raw_read_close, +// .extensions = "h263", //FIXME remove after writing mpeg4_probe + .value = CODEC_ID_H263, +}; + AVOutputFormat h263_oformat = { "h263", "raw h263", @@ -538,6 +566,7 @@ av_register_input_format(&ac3_iformat); av_register_output_format(&ac3_oformat); + av_register_input_format(&h263_iformat); av_register_output_format(&h263_oformat); av_register_input_format(&m4v_iformat);