1 /*
2 * Creative Voice File demuxer.
3 * Copyright (c) 2006 Aurelien Jacobs <aurel@gnuage.org>
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
25
26
28 {
30
32 return 0;
35 if (~version + 0x1234 != check)
36 return 10;
37
39 }
40
42 {
45 int header_size;
47
50 if (header_size != 4) {
53 }
56 if (!st)
59
61 return 0;
62 }
63
64 int
66 {
71 int size, tmp_codec=-1;
73 int channels = 1;
76
81 0,
83
93 }
94 max_size -= 4;
95
96 switch (type) {
100 if (sample_rate)
105 } else
109 max_size -= 2;
110 channels = 1;
111 break;
112
114 break;
115
120 sample_rate = 256000000 / (channels * (65536 -
sample_rate));
122 max_size -= 4;
123 break;
124
131 } else
136 max_size -= 12;
137 break;
138
139 default:
143 break;
144 }
145 }
146
147 if (tmp_codec >= 0) {
151 else if (dec->
codec_id != tmp_codec)
157 }
159 }
160 }
161
163
164 if (max_size <= 0)
165 max_size = 2048;
168
171
175 else
177
179 }
180
182 {
184 }
185
187 int64_t timestamp,
int flags)
188 {
192
193 if (index >= 0 && index < st->nb_index_entries - 1) {
198 return 0;
201 // prepare context for seek_frame_generic()
204 }
205 return -1;
206 }
207
217 };