vp9: fix parser return values in error case
authorwm4 <nfxjfg@googlemail.com>
Fri, 9 Jan 2015 01:13:36 +0000 (02:13 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 9 Jan 2015 11:34:05 +0000 (12:34 +0100)
The parser must always set the out_size and out_data pointers. The API
seems to require it, and the common code in parser.c also relies on it.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/vp9_parser.c

index af033c2..922f36f 100644 (file)
@@ -77,6 +77,8 @@ static int parse(AVCodecParserContext *ctx,
                     idx += a; \
                     if (sz > size) { \
                         s->n_frames = 0; \
+                        *out_size = 0; \
+                        *out_data = data; \
                         av_log(avctx, AV_LOG_ERROR, \
                                "Superframe packet size too big: %u > %d\n", \
                                sz, size); \