---
 libavcodec/h264_parser.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index 2ed3dd0..96fe486 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -403,7 +403,7 @@ static int h264_parse(AVCodecParserContext *s,
 {
     H264Context *h   = s->priv_data;
     ParseContext *pc = &h->parse_context;
-    int next;
+    int next, ret;
 
     if (!h->got_first) {
         h->got_first = 1;
@@ -424,12 +424,12 @@ static int h264_parse(AVCodecParserContext *s,
         next = buf_size;
     } else {
         next = h264_find_frame_end(h, buf, buf_size);
-
-        if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
-            *poutbuf      = NULL;
-            *poutbuf_size = 0;
+        ret  = ff_combine_packet(pc, next, &buf, &buf_size,
+                                 poutbuf, poutbuf_size);
+        if (ret == AVERROR(EAGAIN))
             return buf_size;
-        }
+        if (ret == AVERROR(ENOMEM))
+            return ret;
 
         if (next < 0 && next != END_NOT_FOUND) {
             assert(pc->last_index + next >= 0);
-- 
1.8.3.2

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

Reply via email to