vp9_parser: handle zero-sized packets.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Ronald S. Bultje 2013-12-03 07:29:35 -05:00 committed by Michael Niedermayer
parent 0e15a344c1
commit 9695fb2622
1 changed files with 7 additions and 0 deletions

View File

@ -45,6 +45,13 @@ static int parse(AVCodecParserContext *ctx,
VP9ParseContext *s = ctx->priv_data; VP9ParseContext *s = ctx->priv_data;
int marker; int marker;
if (size <= 0) {
*out_size = 0;
*out_data = data;
return 0;
}
if (s->n_frames > 0) { if (s->n_frames > 0) {
*out_data = data; *out_data = data;
*out_size = s->size[--s->n_frames]; *out_size = s->size[--s->n_frames];