[FFmpeg-cvslog] vp9: fix parser return values in error case

wm4 git at videolan.org
Tue Jan 20 03:36:14 CET 2015


ffmpeg | branch: release/2.2 | wm4 <nfxjfg at googlemail.com> | Fri Jan  9 02:13:36 2015 +0100| [fc1fed62d9da6f752fbfa4f27fbc1aab7f884c67] | committer: Michael Niedermayer

vp9: fix parser return values in error case

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 at gmx.at>
(cherry picked from commit b88e80589bd11ef935a5e9dab53d4edb00de16e4)

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

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

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

diff --git a/libavcodec/vp9_parser.c b/libavcodec/vp9_parser.c
index af033c2..922f36f 100644
--- a/libavcodec/vp9_parser.c
+++ b/libavcodec/vp9_parser.c
@@ -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); \



More information about the ffmpeg-cvslog mailing list