projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d09d00
)
vp6: Reset the internal state when aborting key frames header parsing
author
Laurent Aimar
<fenrir@videolan.org>
Fri, 23 Sep 2011 20:36:11 +0000
(22:36 +0200)
committer
Janne Grunau
<janne-libav@jannau.net>
Thu, 6 Oct 2011 22:37:32 +0000
(
00:37
+0200)
It prevents leaving the state only half initialized.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
libavcodec/vp6.c
patch
|
blob
|
history
diff --git
a/libavcodec/vp6.c
b/libavcodec/vp6.c
index
6928a91
..
e29f901
100644
(file)
--- 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);