diff options
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 9a79ac7..9c1bd92 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); |