From: Luca Barbato <[email protected]>
---
libavcodec/aac_ac3_parser.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c
index ec19f23..942f0d2 100644
--- a/libavcodec/aac_ac3_parser.c
+++ b/libavcodec/aac_ac3_parser.c
@@ -35,6 +35,7 @@ int ff_aac_ac3_parse(AVCodecParserContext *s1,
ParseContext *pc = &s->pc;
int len, i;
int new_frame_start;
+ int ret;
get_next:
i = END_NOT_FOUND;
@@ -65,12 +66,13 @@ get_next:
}
}
- if (ff_combine_frame(pc, i, &buf, &buf_size) < 0) {
+ ret = ff_parser_combine_data(pc, i, &buf, &buf_size, poutbuf,
poutbuf_size);
+ if (ret == AVERROR(EAGAIN)) {
s->remaining_size -= FFMIN(s->remaining_size, buf_size);
- *poutbuf = NULL;
- *poutbuf_size = 0;
return buf_size;
}
+ if (ret == AVERROR(ENOMEM))
+ return ret;
*poutbuf = buf;
*poutbuf_size = buf_size;
--
1.9.3 (Apple Git-50)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel