annotate libmpcodecs/ae_toolame.h @ 32972:fbaae7fe1a13

Fix several issues with Translate(). 1. The "Unsafe!" comment has been removed, because the strings passed to the function are strcpy'd. 2. The needless memsets (one of which with wrong size) have been removed in favor of a sufficiently simple initialization of trbuf. 3. The array indices are unsigned now, and the manual optimization of having strlen() outside the for loop has been removed in favor of optimization performed by the compiler. 4. There is a check now to prevent an out-of-bounds array access.
author ib
date Tue, 08 Mar 2011 20:56:51 +0000
parents 3afcf20a13e4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
30421
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26029
diff changeset
1 /*
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26029
diff changeset
2 * This file is part of MPlayer.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26029
diff changeset
3 *
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26029
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26029
diff changeset
5 * it under the terms of the GNU General Public License as published by
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26029
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26029
diff changeset
7 * (at your option) any later version.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26029
diff changeset
8 *
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26029
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26029
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26029
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26029
diff changeset
12 * GNU General Public License for more details.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26029
diff changeset
13 *
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26029
diff changeset
14 * You should have received a copy of the GNU General Public License along
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26029
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26029
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26029
diff changeset
17 */
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 26029
diff changeset
18
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25869
diff changeset
19 #ifndef MPLAYER_AE_TOOLAME_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25869
diff changeset
20 #define MPLAYER_AE_TOOLAME_H
13425
a87f1a948a24 encoding to mp2 with libtoolame - only cbr atm
nicodvb
parents:
diff changeset
21
15234
e84a6ae9d51e audio encoding reworked
nicodvb
parents: 13425
diff changeset
22 #include "ae.h"
31438
3afcf20a13e4 Move faac/lame/toolame/twolame option array declarations to appropriate headers.
diego
parents: 31436
diff changeset
23 #include "m_option.h"
3afcf20a13e4 Move faac/lame/toolame/twolame option array declarations to appropriate headers.
diego
parents: 31436
diff changeset
24
3afcf20a13e4 Move faac/lame/toolame/twolame option array declarations to appropriate headers.
diego
parents: 31436
diff changeset
25 extern const m_option_t toolameopts_conf[];
13425
a87f1a948a24 encoding to mp2 with libtoolame - only cbr atm
nicodvb
parents:
diff changeset
26
15234
e84a6ae9d51e audio encoding reworked
nicodvb
parents: 13425
diff changeset
27 int mpae_init_toolame(audio_encoder_t *encoder);
13425
a87f1a948a24 encoding to mp2 with libtoolame - only cbr atm
nicodvb
parents:
diff changeset
28
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25869
diff changeset
29 #endif /* MPLAYER_AE_TOOLAME_H */