From: Luca Barbato <[email protected]>
---
libavcodec/latm_parser.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/libavcodec/latm_parser.c b/libavcodec/latm_parser.c
index 6fdb897..7a334d9 100644
--- a/libavcodec/latm_parser.c
+++ b/libavcodec/latm_parser.c
@@ -87,18 +87,19 @@ static int latm_parse(AVCodecParserContext *s1,
AVCodecContext *avctx,
{
LATMParseContext *s = s1->priv_data;
ParseContext *pc = &s->pc;
- int next;
+ int next, ret;
if (s1->flags & PARSER_FLAG_COMPLETE_FRAMES) {
next = buf_size;
} else {
next = latm_find_frame_end(s1, buf, buf_size);
- if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
- *poutbuf = NULL;
- *poutbuf_size = 0;
+ ret = ff_parser_combine_data(pc, next, &buf, &buf_size,
+ poutbuf, poutbuf_size);
+ if (ret == AVERROR(EAGAIN))
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