annotate tta.c @ 5945:0abde6943674 libavformat

Set audio bit rate. Patch by Howard Chu, hyc highlandsun com
author cehoyos
date Sun, 11 Apr 2010 12:21:30 +0000
parents 536e5527c1e0
children 81614e9b541b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
1 /*
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
2 * TTA demuxer
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
3 * Copyright (c) 2006 Alex Beregszaszi
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
4 *
1358
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1281
diff changeset
5 * This file is part of FFmpeg.
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1281
diff changeset
6 *
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1281
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
9 * License as published by the Free Software Foundation; either
1358
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1281
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
11 *
1358
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1281
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
15 * Lesser General Public License for more details.
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
16 *
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
1358
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1281
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
2217
06083249909c license header consistency cosmetics
diego
parents: 2041
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
20 */
3286
6f61c3b36632 Use full path for #includes from another directory.
diego
parents: 2771
diff changeset
21
4872
304a0ea063f0 Rename bitstream.h to get_bits.h.
stefano
parents: 4243
diff changeset
22 #include "libavcodec/get_bits.h"
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
23 #include "avformat.h"
5466
af08ed2b60b8 Parse ID3v[12] metadata from TTA files.
jai_menon
parents: 4872
diff changeset
24 #include "id3v2.h"
af08ed2b60b8 Parse ID3v[12] metadata from TTA files.
jai_menon
parents: 4872
diff changeset
25 #include "id3v1.h"
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
26
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
27 typedef struct {
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
28 int totalframes, currentframe;
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
29 } TTAContext;
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
30
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
31 static int tta_probe(AVProbeData *p)
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
32 {
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
33 const uint8_t *d = p->buf;
5466
af08ed2b60b8 Parse ID3v[12] metadata from TTA files.
jai_menon
parents: 4872
diff changeset
34
af08ed2b60b8 Parse ID3v[12] metadata from TTA files.
jai_menon
parents: 4872
diff changeset
35 if (ff_id3v2_match(d))
af08ed2b60b8 Parse ID3v[12] metadata from TTA files.
jai_menon
parents: 4872
diff changeset
36 d += ff_id3v2_tag_len(d);
af08ed2b60b8 Parse ID3v[12] metadata from TTA files.
jai_menon
parents: 4872
diff changeset
37
5468
4201c086a746 10l : make sure probe buffer is large enough.
jai_menon
parents: 5466
diff changeset
38 if (d - p->buf >= p->buf_size)
4201c086a746 10l : make sure probe buffer is large enough.
jai_menon
parents: 5466
diff changeset
39 return 0;
4201c086a746 10l : make sure probe buffer is large enough.
jai_menon
parents: 5466
diff changeset
40
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
41 if (d[0] == 'T' && d[1] == 'T' && d[2] == 'A' && d[3] == '1')
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
42 return 80;
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
43 return 0;
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
44 }
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
45
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
46 static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap)
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
47 {
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
48 TTAContext *c = s->priv_data;
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
49 AVStream *st;
1969
f7b57a2fa7ca argh, who commited this trash
michael
parents: 1968
diff changeset
50 int i, channels, bps, samplerate, datalen, framelen;
5466
af08ed2b60b8 Parse ID3v[12] metadata from TTA files.
jai_menon
parents: 4872
diff changeset
51 uint64_t framepos, start_offset;
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
52
5466
af08ed2b60b8 Parse ID3v[12] metadata from TTA files.
jai_menon
parents: 4872
diff changeset
53 ff_id3v2_read(s);
af08ed2b60b8 Parse ID3v[12] metadata from TTA files.
jai_menon
parents: 4872
diff changeset
54 if (!av_metadata_get(s->metadata, "", NULL, AV_METADATA_IGNORE_SUFFIX))
af08ed2b60b8 Parse ID3v[12] metadata from TTA files.
jai_menon
parents: 4872
diff changeset
55 ff_id3v1_read(s);
af08ed2b60b8 Parse ID3v[12] metadata from TTA files.
jai_menon
parents: 4872
diff changeset
56
af08ed2b60b8 Parse ID3v[12] metadata from TTA files.
jai_menon
parents: 4872
diff changeset
57 start_offset = url_ftell(s->pb);
4243
964903243e66 remove ff_get_fourcc() and use AV_RL32() instead
aurel
parents: 3908
diff changeset
58 if (get_le32(s->pb) != AV_RL32("TTA1"))
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
59 return -1; // not tta file
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
60
2771
d52c718e83f9 Use dynamically allocated ByteIOContext in AVFormatContext
andoma
parents: 2375
diff changeset
61 url_fskip(s->pb, 2); // FIXME: flags
d52c718e83f9 Use dynamically allocated ByteIOContext in AVFormatContext
andoma
parents: 2375
diff changeset
62 channels = get_le16(s->pb);
d52c718e83f9 Use dynamically allocated ByteIOContext in AVFormatContext
andoma
parents: 2375
diff changeset
63 bps = get_le16(s->pb);
d52c718e83f9 Use dynamically allocated ByteIOContext in AVFormatContext
andoma
parents: 2375
diff changeset
64 samplerate = get_le32(s->pb);
1079
40e81416015d sanity checks some might have been exploitable
michael
parents: 957
diff changeset
65 if(samplerate <= 0 || samplerate > 1000000){
40e81416015d sanity checks some might have been exploitable
michael
parents: 957
diff changeset
66 av_log(s, AV_LOG_ERROR, "nonsense samplerate\n");
40e81416015d sanity checks some might have been exploitable
michael
parents: 957
diff changeset
67 return -1;
40e81416015d sanity checks some might have been exploitable
michael
parents: 957
diff changeset
68 }
40e81416015d sanity checks some might have been exploitable
michael
parents: 957
diff changeset
69
2771
d52c718e83f9 Use dynamically allocated ByteIOContext in AVFormatContext
andoma
parents: 2375
diff changeset
70 datalen = get_le32(s->pb);
1079
40e81416015d sanity checks some might have been exploitable
michael
parents: 957
diff changeset
71 if(datalen < 0){
40e81416015d sanity checks some might have been exploitable
michael
parents: 957
diff changeset
72 av_log(s, AV_LOG_ERROR, "nonsense datalen\n");
40e81416015d sanity checks some might have been exploitable
michael
parents: 957
diff changeset
73 return -1;
40e81416015d sanity checks some might have been exploitable
michael
parents: 957
diff changeset
74 }
40e81416015d sanity checks some might have been exploitable
michael
parents: 957
diff changeset
75
2771
d52c718e83f9 Use dynamically allocated ByteIOContext in AVFormatContext
andoma
parents: 2375
diff changeset
76 url_fskip(s->pb, 4); // header crc
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
77
1968
170e151f1d9e 10^10l to the idiot who designed this format and didnt even realize what number he used
michael
parents: 1358
diff changeset
78 framelen = samplerate*256/245;
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
79 c->totalframes = datalen / framelen + ((datalen % framelen) ? 1 : 0);
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
80 c->currentframe = 0;
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
81
1079
40e81416015d sanity checks some might have been exploitable
michael
parents: 957
diff changeset
82 if(c->totalframes >= UINT_MAX/sizeof(uint32_t)){
40e81416015d sanity checks some might have been exploitable
michael
parents: 957
diff changeset
83 av_log(s, AV_LOG_ERROR, "totalframes too large\n");
40e81416015d sanity checks some might have been exploitable
michael
parents: 957
diff changeset
84 return -1;
40e81416015d sanity checks some might have been exploitable
michael
parents: 957
diff changeset
85 }
2031
d3c1ef5b9a2f Change from using a seek table internal to the TTA demuxer to using the standard lavf index.
conrad
parents: 2001
diff changeset
86
d3c1ef5b9a2f Change from using a seek table internal to the TTA demuxer to using the standard lavf index.
conrad
parents: 2001
diff changeset
87 st = av_new_stream(s, 0);
d3c1ef5b9a2f Change from using a seek table internal to the TTA demuxer to using the standard lavf index.
conrad
parents: 2001
diff changeset
88 if (!st)
2273
7eb456c4ed8a Replace all occurrences of AVERROR_NOMEM with AVERROR(ENOMEM).
takis
parents: 2217
diff changeset
89 return AVERROR(ENOMEM);
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
90
2031
d3c1ef5b9a2f Change from using a seek table internal to the TTA demuxer to using the standard lavf index.
conrad
parents: 2001
diff changeset
91 av_set_pts_info(st, 64, 1, samplerate);
d3c1ef5b9a2f Change from using a seek table internal to the TTA demuxer to using the standard lavf index.
conrad
parents: 2001
diff changeset
92 st->start_time = 0;
d3c1ef5b9a2f Change from using a seek table internal to the TTA demuxer to using the standard lavf index.
conrad
parents: 2001
diff changeset
93 st->duration = datalen;
d3c1ef5b9a2f Change from using a seek table internal to the TTA demuxer to using the standard lavf index.
conrad
parents: 2001
diff changeset
94
2771
d52c718e83f9 Use dynamically allocated ByteIOContext in AVFormatContext
andoma
parents: 2375
diff changeset
95 framepos = url_ftell(s->pb) + 4*c->totalframes + 4;
2031
d3c1ef5b9a2f Change from using a seek table internal to the TTA demuxer to using the standard lavf index.
conrad
parents: 2001
diff changeset
96
d3c1ef5b9a2f Change from using a seek table internal to the TTA demuxer to using the standard lavf index.
conrad
parents: 2001
diff changeset
97 for (i = 0; i < c->totalframes; i++) {
2771
d52c718e83f9 Use dynamically allocated ByteIOContext in AVFormatContext
andoma
parents: 2375
diff changeset
98 uint32_t size = get_le32(s->pb);
2031
d3c1ef5b9a2f Change from using a seek table internal to the TTA demuxer to using the standard lavf index.
conrad
parents: 2001
diff changeset
99 av_add_index_entry(st, framepos, i*framelen, size, 0, AVINDEX_KEYFRAME);
d3c1ef5b9a2f Change from using a seek table internal to the TTA demuxer to using the standard lavf index.
conrad
parents: 2001
diff changeset
100 framepos += size;
d3c1ef5b9a2f Change from using a seek table internal to the TTA demuxer to using the standard lavf index.
conrad
parents: 2001
diff changeset
101 }
2771
d52c718e83f9 Use dynamically allocated ByteIOContext in AVFormatContext
andoma
parents: 2375
diff changeset
102 url_fskip(s->pb, 4); // seektable crc
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
103
5910
536e5527c1e0 Define AVMediaType enum, and use it instead of enum CodecType, which
stefano
parents: 5468
diff changeset
104 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
105 st->codec->codec_id = CODEC_ID_TTA;
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
106 st->codec->channels = channels;
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
107 st->codec->sample_rate = samplerate;
3908
1d3d17de20ba Bump Major version, this commit is almost just renaming bits_per_sample to
michael
parents: 3424
diff changeset
108 st->codec->bits_per_coded_sample = bps;
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
109
5466
af08ed2b60b8 Parse ID3v[12] metadata from TTA files.
jai_menon
parents: 4872
diff changeset
110 st->codec->extradata_size = url_ftell(s->pb) - start_offset;
1079
40e81416015d sanity checks some might have been exploitable
michael
parents: 957
diff changeset
111 if(st->codec->extradata_size+FF_INPUT_BUFFER_PADDING_SIZE <= (unsigned)st->codec->extradata_size){
40e81416015d sanity checks some might have been exploitable
michael
parents: 957
diff changeset
112 //this check is redundant as get_buffer should fail
40e81416015d sanity checks some might have been exploitable
michael
parents: 957
diff changeset
113 av_log(s, AV_LOG_ERROR, "extradata_size too large\n");
40e81416015d sanity checks some might have been exploitable
michael
parents: 957
diff changeset
114 return -1;
40e81416015d sanity checks some might have been exploitable
michael
parents: 957
diff changeset
115 }
957
99a7f76a8954 10l, allocate bitbuffer with regard to the padding size
alex
parents: 948
diff changeset
116 st->codec->extradata = av_mallocz(st->codec->extradata_size+FF_INPUT_BUFFER_PADDING_SIZE);
5466
af08ed2b60b8 Parse ID3v[12] metadata from TTA files.
jai_menon
parents: 4872
diff changeset
117 url_fseek(s->pb, start_offset, SEEK_SET);
2771
d52c718e83f9 Use dynamically allocated ByteIOContext in AVFormatContext
andoma
parents: 2375
diff changeset
118 get_buffer(s->pb, st->codec->extradata, st->codec->extradata_size);
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
119
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
120 return 0;
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
121 }
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
122
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
123 static int tta_read_packet(AVFormatContext *s, AVPacket *pkt)
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
124 {
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
125 TTAContext *c = s->priv_data;
2031
d3c1ef5b9a2f Change from using a seek table internal to the TTA demuxer to using the standard lavf index.
conrad
parents: 2001
diff changeset
126 AVStream *st = s->streams[0];
2375
14828c79f290 Set dts in tta demuxer
conrad
parents: 2273
diff changeset
127 int size, ret;
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
128
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
129 // FIXME!
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
130 if (c->currentframe > c->totalframes)
2031
d3c1ef5b9a2f Change from using a seek table internal to the TTA demuxer to using the standard lavf index.
conrad
parents: 2001
diff changeset
131 return -1;
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
132
2375
14828c79f290 Set dts in tta demuxer
conrad
parents: 2273
diff changeset
133 size = st->index_entries[c->currentframe].size;
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
134
2771
d52c718e83f9 Use dynamically allocated ByteIOContext in AVFormatContext
andoma
parents: 2375
diff changeset
135 ret = av_get_packet(s->pb, pkt, size);
2375
14828c79f290 Set dts in tta demuxer
conrad
parents: 2273
diff changeset
136 pkt->dts = st->index_entries[c->currentframe++].timestamp;
14828c79f290 Set dts in tta demuxer
conrad
parents: 2273
diff changeset
137 return ret;
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
138 }
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
139
2041
b377fc84b6f9 Support for seeking in TTA files.
conrad
parents: 2031
diff changeset
140 static int tta_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
b377fc84b6f9 Support for seeking in TTA files.
conrad
parents: 2031
diff changeset
141 {
b377fc84b6f9 Support for seeking in TTA files.
conrad
parents: 2031
diff changeset
142 TTAContext *c = s->priv_data;
b377fc84b6f9 Support for seeking in TTA files.
conrad
parents: 2031
diff changeset
143 AVStream *st = s->streams[stream_index];
b377fc84b6f9 Support for seeking in TTA files.
conrad
parents: 2031
diff changeset
144 int index = av_index_search_timestamp(st, timestamp, flags);
b377fc84b6f9 Support for seeking in TTA files.
conrad
parents: 2031
diff changeset
145 if (index < 0)
b377fc84b6f9 Support for seeking in TTA files.
conrad
parents: 2031
diff changeset
146 return -1;
b377fc84b6f9 Support for seeking in TTA files.
conrad
parents: 2031
diff changeset
147
b377fc84b6f9 Support for seeking in TTA files.
conrad
parents: 2031
diff changeset
148 c->currentframe = index;
2771
d52c718e83f9 Use dynamically allocated ByteIOContext in AVFormatContext
andoma
parents: 2375
diff changeset
149 url_fseek(s->pb, st->index_entries[index].pos, SEEK_SET);
2041
b377fc84b6f9 Support for seeking in TTA files.
conrad
parents: 2031
diff changeset
150
b377fc84b6f9 Support for seeking in TTA files.
conrad
parents: 2031
diff changeset
151 return 0;
b377fc84b6f9 Support for seeking in TTA files.
conrad
parents: 2031
diff changeset
152 }
b377fc84b6f9 Support for seeking in TTA files.
conrad
parents: 2031
diff changeset
153
1167
d89d7ef290da give AVInput/OutputFormat structs consistent names
mru
parents: 1079
diff changeset
154 AVInputFormat tta_demuxer = {
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
155 "tta",
3424
7a0230981402 Make long_names in lavf/lavdev optional depending on CONFIG_SMALL.
diego
parents: 3286
diff changeset
156 NULL_IF_CONFIG_SMALL("True Audio"),
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
157 sizeof(TTAContext),
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
158 tta_probe,
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
159 tta_read_header,
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
160 tta_read_packet,
2031
d3c1ef5b9a2f Change from using a seek table internal to the TTA demuxer to using the standard lavf index.
conrad
parents: 2001
diff changeset
161 NULL,
2041
b377fc84b6f9 Support for seeking in TTA files.
conrad
parents: 2031
diff changeset
162 tta_read_seek,
948
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
163 .extensions = "tta",
1e766711e6c8 tta demuxer, also usable for moving tta audio data into an other container
alex
parents:
diff changeset
164 };