Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-09-24 00:36:11 +0400
committerReinhard Tartler <siretart@tauware.de>2011-12-24 18:47:57 +0400
commite28bb18fdc894dfdc1befa9f5e748ccb649a8c76 (patch)
treec98d47912c15f25a5aa2169f59d6731503c97518 /libavcodec
parenta62779d986292a5a4d5fb4c39031f9665c39b4a4 (diff)
vp6: Reset the internal state when aborting key frames header parsing
It prevents leaving the state only half initialized. Signed-off-by: Janne Grunau <janne-libav@jannau.net> (cherry picked from commit a72cad0a6c05aa74940101e937cb3dc602d7d67b) Signed-off-by: Reinhard Tartler <siretart@tauware.de> (cherry picked from commit c76505e0dee0890e39636ddebd2707ab3ea5b8de) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vp6.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c
index 98befe6a8b..955a6e9fd5 100644
--- a/libavcodec/vp6.c
+++ b/libavcodec/vp6.c
@@ -136,8 +136,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);