1 /*
2 * MD STUDIO audio demuxer
3 *
4 * Copyright (c) 2009 Benjamin Larsson
5 *
6 * This file is part of FFmpeg.
7 *
8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * FFmpeg is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
30
31 #define AT1_SU_SIZE 212
32
34 {
36 return 0;
37
38 /* Magic is '00 08 00 00' in little-endian*/
40 int ch, block_size, score = 0;
42
43 if (ch != 1 && ch != 2)
44 return 0;
45
47 /* Check so that the redundant bsm bytes and info bytes are valid
48 * the block size mode bytes have to be the same
49 * the info bytes have to be the same
50 */
51 for (
int i = 2048 + block_size;
i + block_size <=
p->buf_size;
i += block_size) {
53 return 0;
54 score++;
55 }
57 }
58 return 0;
59 }
60
62 {
64 char title[256 + 1];
66 if (!st)
68
69 /* Read the title, parse the number of channels and skip to pos 2048(0x800) */
74 title[sizeof(title) - 1] = '0円';
75 if (title[0] != '0円')
80
81
86
90 }
91
93
96 return 0;
97 }
98
100 {
102 }
103
108 .p.extensions = "aea",
113 };