---
 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 b28b97e..3c3512d 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_combine_packet(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.8.3.2

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to