[FFmpeg-cvslog] vp9_parser: handle zero-sized packets.

Ronald S. Bultje git at videolan.org
Tue Dec 3 14:37:20 CET 2013


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Tue Dec  3 07:29:35 2013 -0500| [9695fb2622192429db95ec04960544e5e6c6743c] | committer: Michael Niedermayer

vp9_parser: handle zero-sized packets.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9695fb2622192429db95ec04960544e5e6c6743c
---

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

diff --git a/libavcodec/vp9_parser.c b/libavcodec/vp9_parser.c
index 6301936..24f588f 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];



More information about the ffmpeg-cvslog mailing list