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
27
28 #define AT1_SU_SIZE 212
29
31 {
33 return 0;
34
35 /* Magic is '00 08 00 00' in Little Endian*/
37 int bsm_s, bsm_e, inb_s, inb_e, ch;
40 inb_s = p->
buf[2048+1];
41 inb_e = p->
buf[2048+210];
42 bsm_e = p->
buf[2048+211];
43
44 if (ch != 1 && ch != 2)
45 return 0;
46
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 if (bsm_s == bsm_e && inb_s == inb_e)
53 }
54 return 0;
55 }
56
58 {
60 if (!st)
62
63 /* Parse the amount of channels and skip to pos 2048(0x800) */
67
68
73
76 return -1;
77 }
78
80
82 return 0;
83 }
84
86 {
88
90 if (ret <= 0)
92
94 }
95
104 .extensions = "aea",
105 };