summaryrefslogtreecommitdiff
path: root/libavformat/raw.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-02-26 03:36:04 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-02-26 03:36:04 +0000
commit85ad569574a1a7d81c48b10e394b1ce7aaca5b7b (patch)
tree55f895388471ed46c2ce9997101ec6edb939f303 /libavformat/raw.c
parent21754ce65c78acf8134edbe1f60ce503c0345977 (diff)
shorten decoder by (Jeff Muizelaar <jrmuizel gmail com>)
Originally committed as revision 3984 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 075db7918b..a0bbbce4f3 100644
--- a/libavformat/raw.c
+++ b/libavformat/raw.c
@@ -188,6 +188,21 @@ static int ac3_read_header(AVFormatContext *s,
return 0;
}
+static int shorten_read_header(AVFormatContext *s,
+ AVFormatParameters *ap)
+{
+ AVStream *st;
+
+ st = av_new_stream(s, 0);
+ if (!st)
+ return AVERROR_NOMEM;
+ st->codec.codec_type = CODEC_TYPE_AUDIO;
+ st->codec.codec_id = CODEC_ID_SHORTEN;
+ st->need_parsing = 1;
+ /* the parameters will be extracted from the compressed bitstream */
+ return 0;
+}
+
/* dts read */
static int dts_read_header(AVFormatContext *s,
AVFormatParameters *ap)
@@ -295,6 +310,17 @@ static int h261_probe(AVProbeData *p)
return 0;
}
+AVInputFormat shorten_iformat = {
+ "shn",
+ "raw shn",
+ 0,
+ NULL,
+ shorten_read_header,
+ raw_read_partial_packet,
+ raw_read_close,
+ .extensions = "shn",
+};
+
AVInputFormat ac3_iformat = {
"ac3",
"raw ac3",
@@ -672,6 +698,9 @@ AVOutputFormat null_oformat = {
int raw_init(void)
{
+
+ av_register_input_format(&shorten_iformat);
+
av_register_input_format(&ac3_iformat);
av_register_output_format(&ac3_oformat);