summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-05-22 14:12:22 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-05-22 14:12:22 +0000
commitd07f90433af9b830efc47c19723d23d176be9c55 (patch)
tree4b5d4c2f0919f90ed5a828f3b80187990910607e /libavformat
parente67e14d54cae1f56e9fbd94fb665268e6c1f48c6 (diff)
truncated h263 decoding support / H263-ES "demuxer"
Originally committed as revision 1898 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/raw.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/libavformat/raw.c b/libavformat/raw.c
index 1c528c17a0..2354ad15cf 100644
--- a/libavformat/raw.c
+++ b/libavformat/raw.c
@@ -208,6 +208,22 @@ static int mpegvideo_probe(AVProbeData *p)
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 @@ AVOutputFormat ac3_oformat = {
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 @@ int raw_init(void)
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);