[FFmpeg-cvslog] vp6: Reset the internal state when aborting key frames header parsing in vp6 decoder .
Laurent Aimar
git at videolan.org
Sat Sep 24 19:31:43 CEST 2011
ffmpeg | branch: master | Laurent Aimar <fenrir at elivagar.org> | Sat Sep 24 16:19:25 2011 +0200| [91f104496bb7632ed5ff03798e06dd8af014f0d9] | committer: Michael Niedermayer
vp6:Reset the internal state when aborting key frames header parsing in vp6 decoder.
It prevents leaving the state only half initialized.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=91f104496bb7632ed5ff03798e06dd8af014f0d9
---
libavcodec/vp6.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c
index 31af095..a95e4be 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);
More information about the ffmpeg-cvslog
mailing list