projects
/
fdkaac.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cleanup interface of aac_encode_frame()
[fdkaac.git]
/
src
/
main.c
diff --git
a/src/main.c
b/src/main.c
index 5e0dc0cfdcc9902a10e821c02d5e9f16a6f78825..d06c6830fefdc69a11c99440422247886aba008b 100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-493,12
+493,8
@@
int encode(aacenc_param_ex_t *params, pcm_reader_t *reader,
HANDLE_AACENCODER encoder, uint32_t frame_length,
m4af_ctx_t *m4af)
{
HANDLE_AACENCODER encoder, uint32_t frame_length,
m4af_ctx_t *m4af)
{
- struct buffer_t {
- uint8_t *data;
- uint32_t len, size;
- };
int16_t *ibuf = 0, *ip;
int16_t *ibuf = 0, *ip;
-
struct buffer
_t obuf[2] = {{ 0 }}, *obp;
+
aacenc_result
_t obuf[2] = {{ 0 }}, *obp;
unsigned flip = 0;
int nread = 1;
int rc = -1;
unsigned flip = 0;
int nread = 1;
int rc = -1;
@@
-530,8
+526,7
@@
int encode(aacenc_param_ex_t *params, pcm_reader_t *reader,
remaining = nread;
do {
obp = &obuf[flip];
remaining = nread;
do {
obp = &obuf[flip];
- consumed = aac_encode_frame(encoder, fmt, ip, remaining,
- &obp->data, &obp->len, &obp->size);
+ consumed = aac_encode_frame(encoder, fmt, ip, remaining, obp);
if (consumed < 0) goto END;
if (consumed == 0 && obp->len == 0) goto DONE;
if (obp->len == 0) break;
if (consumed < 0) goto END;
if (consumed == 0 && obp->len == 0) goto DONE;
if (obp->len == 0) break;
This page took
0.010233 seconds
and
4
git commands to generate.