aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/raw.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-05-30 20:37:15 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-05-30 20:37:15 +0000
commitc6148de2320739d4443fa702f78eac68fc0ab044 (patch)
tree8f67f7c50aca4c412fa0dc3f366f088cc9c96fa7 /libavformat/raw.c
parent20646267cdde0ec0c6d8fb61b7bab29f431fa541 (diff)
downloadffmpeg-c6148de2320739d4443fa702f78eac68fc0ab044.tar.gz
h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
Originally committed as revision 3176 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/raw.c')
-rw-r--r--libavformat/raw.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/libavformat/raw.c b/libavformat/raw.c
index fbdbb7aa1c..35b07159b6 100644
--- a/libavformat/raw.c
+++ b/libavformat/raw.c
@@ -259,6 +259,21 @@ static int h263_probe(AVProbeData *p)
return 0;
}
+static int h261_probe(AVProbeData *p)
+{
+ int code;
+ const uint8_t *d;
+
+ if (p->buf_size < 6)
+ return 0;
+ d = p->buf;
+ code = (d[0] << 12) | (d[1] << 4) | (d[2] >> 4);
+ if (code == 0x10) {
+ return 50;
+ }
+ return 0;
+}
+
AVInputFormat ac3_iformat = {
"ac3",
"raw ac3",
@@ -285,6 +300,18 @@ AVOutputFormat ac3_oformat = {
};
#endif //CONFIG_ENCODERS
+AVInputFormat h261_iformat = {
+ "h261",
+ "raw h261",
+ 0,
+ h261_probe,
+ video_read_header,
+ raw_read_partial_packet,
+ raw_read_close,
+ .extensions = "h261",
+ .value = CODEC_ID_H261,
+};
+
AVInputFormat h263_iformat = {
"h263",
"raw h263",
@@ -586,6 +613,8 @@ int raw_init(void)
av_register_input_format(&ac3_iformat);
av_register_output_format(&ac3_oformat);
+ av_register_input_format(&h261_iformat);
+
av_register_input_format(&h263_iformat);
av_register_output_format(&h263_oformat);