[FFmpeg-devel] [PATCH] vp9_parser: handle zero-sized packets.

Ronald S. Bultje rsbultje at gmail.com
Tue Dec 3 13:27:16 CET 2013


---
 libavcodec/vp9_parser.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/vp9_parser.c b/libavcodec/vp9_parser.c
index 6301936..46e4932 100644
--- a/libavcodec/vp9_parser.c
+++ b/libavcodec/vp9_parser.c
@@ -45,6 +45,8 @@ static int parse(AVCodecParserContext *ctx,
     VP9ParseContext *s = ctx->priv_data;
     int marker;
 
+    if (size <= 0) return 0;
+
     if (s->n_frames > 0) {
         *out_data = data;
         *out_size = s->size[--s->n_frames];
-- 
1.8.4



More information about the ffmpeg-devel mailing list