On Sat, Sep 24, 2011 at 04:19:25PM +0200, Laurent Aimar wrote: > From 65421b5cb506536bcc9d6a5b6a53c2d29b0583b2 Mon Sep 17 00:00:00 2001 > From: Laurent Aimar <[email protected]> > Date: Fri, 23 Sep 2011 22:36:11 +0200 > Subject: [PATCH 4/4] Reset the internal state when aborting key frames header > parsing in vp6 decoder. > > It prevents leaving the state only half initialized. > --- > libavcodec/vp6.c | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c > index 6928a91..e29f901 100644 > --- a/libavcodec/vp6.c > +++ b/libavcodec/vp6.c > @@ -139,8 +139,11 @@ static int vp6_parse_header(VP56Context *s, const > uint8_t *buf, int buf_size, > if (coeff_offset) { > buf += coeff_offset; > buf_size -= coeff_offset; > - if (buf_size < 0) > + if (buf_size < 0) { > + if (s->framep[VP56_FRAME_CURRENT]->key_frame) > + avcodec_set_dimensions(s->avctx, 0, 0); > return 0; > + } > if (s->use_huffman) { > s->parse_coeff = vp6_parse_coeff_huffman; > init_get_bits(&s->gb, buf, buf_size<<3);
lgtm, queued Janne _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
