From: Patrice Clement <[email protected]>
---
libavcodec/mpeg12dec.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index b66bdc1..fd834b1 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -2631,10 +2631,13 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
void *data,
if (s2->flags & CODEC_FLAG_TRUNCATED) {
int next = ff_mpeg1_find_frame_end(&s2->parse_context, buf,
buf_size, NULL);
-
- if (ff_combine_frame(&s2->parse_context, next,
- (const uint8_t **) &buf, &buf_size) < 0)
+ int ret = ff_combine_frame(&s2->parse_context, next,
+ (const uint8_t **) &buf, &buf_size);
+ if (ret == AVERROR(EAGAIN))
return buf_size;
+
+ if (ret == AVERROR(ENOMEM))
+ return ret;
}
if (s->mpeg_enc_ctx_allocated == 0 && avctx->codec_tag == AV_RL32("VCR2"))
--
1.8.3.2
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel