# HG changeset patch # User michaelni # Date 1053612742 0 # Node ID 56590088f8011b6ae62ecbdcc7f2f12ed43a29e8 # Parent 5cda954c6e9a9f12f29c180e2472dd92780da5fe truncated h263 decoding support / H263-ES "demuxer" diff -r 5cda954c6e9a -r 56590088f801 raw.c --- 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);