From 9695fb2622192429db95ec04960544e5e6c6743c Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Tue, 3 Dec 2013 07:29:35 -0500 Subject: [PATCH] vp9_parser: handle zero-sized packets. Signed-off-by: Michael Niedermayer --- libavcodec/vp9_parser.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/vp9_parser.c b/libavcodec/vp9_parser.c index 6301936232..24f588f441 100644 --- a/libavcodec/vp9_parser.c +++ b/libavcodec/vp9_parser.c @@ -45,6 +45,13 @@ static int parse(AVCodecParserContext *ctx, VP9ParseContext *s = ctx->priv_data; int marker; + if (size <= 0) { + *out_size = 0; + *out_data = data; + + return 0; + } + if (s->n_frames > 0) { *out_data = data; *out_size = s->size[--s->n_frames];