diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-07-14 01:32:14 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-07-14 01:32:14 +0000 |
commit | 23c992532927afa9d3a00677ff40cd071e21dc8f (patch) | |
tree | 232b97558b925172d4c6372c10a5c7e156469f27 /libavformat/raw.c | |
parent | eb507b21c410515b179c0ca85b3db3d83fc296bd (diff) | |
download | ffmpeg-23c992532927afa9d3a00677ff40cd071e21dc8f.tar.gz |
libdts support by (Benjamin Zores <ben at geexbox dot org>)
Originally committed as revision 3310 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/raw.c')
-rw-r--r-- | libavformat/raw.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libavformat/raw.c b/libavformat/raw.c index 9a79ac7b06..9c1bd929c9 100644 --- a/libavformat/raw.c +++ b/libavformat/raw.c @@ -184,6 +184,23 @@ static int ac3_read_header(AVFormatContext *s, return 0; } +/* dts read */ +static int dts_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_DTS; + st->need_parsing = 1; + /* the parameters will be extracted from the compressed bitstream */ + return 0; +} + /* mpeg1/h263 input */ static int video_read_header(AVFormatContext *s, AVFormatParameters *ap) @@ -300,6 +317,17 @@ AVOutputFormat ac3_oformat = { }; #endif //CONFIG_ENCODERS +AVInputFormat dts_iformat = { + "dts", + "raw dts", + 0, + NULL, + dts_read_header, + raw_read_partial_packet, + raw_read_close, + .extensions = "dts", +}; + AVInputFormat h261_iformat = { "h261", "raw h261", @@ -613,6 +641,8 @@ int raw_init(void) av_register_input_format(&ac3_iformat); av_register_output_format(&ac3_oformat); + av_register_input_format(&dts_iformat); + av_register_input_format(&h261_iformat); av_register_input_format(&h263_iformat); |