And use ff_combine_packet.
---
libavcodec/h263_parser.c | 12 ++++++------
libavcodec/h263dec.c | 7 +++++--
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/libavcodec/h263_parser.c b/libavcodec/h263_parser.c
index 8c7eee3..b886b4b 100644
--- a/libavcodec/h263_parser.c
+++ b/libavcodec/h263_parser.c
@@ -69,15 +69,15 @@ static int h263_parse(AVCodecParserContext *s,
const uint8_t *buf, int buf_size)
{
ParseContext *pc = s->priv_data;
- int next;
+ int next, ret;
next = ff_h263_find_frame_end(pc, 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;
*poutbuf = buf;
*poutbuf_size = buf_size;
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 31e014a..bef6bf4 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -407,9 +407,12 @@ int ff_h263_decode_frame(AVCodecContext *avctx, void
*data, int *got_frame,
return AVERROR(ENOSYS);
}
- if (ff_combine_frame(&s->parse_context, next, (const uint8_t **)&buf,
- &buf_size) < 0)
+ ret = ff_combine_frame(&s->parse_context, next, (const uint8_t **)&buf,
+ &buf_size);
+ if (ret == AVERROR(EAGAIN))
return buf_size;
+ if (ret == AVERROR(EAGAIN));
+ return ret;
}
if (s->bitstream_buffer_size && (s->divx_packed || buf_size < 20)) // divx
5.01+/xvid frame reorder
--
1.8.3.2
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel