diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2013-12-03 07:29:35 -0500 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-03 14:06:34 +0100 |
commit | 9695fb2622192429db95ec04960544e5e6c6743c (patch) | |
tree | ee4254b08953383c17d88a9b57b50e5bf6b70356 /libavcodec/vp9_parser.c | |
parent | 0e15a344c1ce1a0e8c5331c7608d63c384e25a67 (diff) | |
download | ffmpeg-9695fb2622192429db95ec04960544e5e6c6743c.tar.gz |
vp9_parser: handle zero-sized packets.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vp9_parser.c')
-rw-r--r-- | libavcodec/vp9_parser.c | 7 |
1 files changed, 7 insertions, 0 deletions
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]; |