summaryrefslogtreecommitdiff
path: root/libavcodec/vc1dec.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-09-20 11:32:25 +0300
committerMartin Storsjö <martin@martin.st>2013-09-22 21:02:52 +0300
commit5e25fdbfe01635cfc650ac4adc27d434b2df0d64 (patch)
treee1277a478d5ce25b5b4a8165736e3369ffb7fec7 /libavcodec/vc1dec.c
parentb772b0e28eba6abf76d86ee8c6e459a86642db5a (diff)
vc1dec: Make sure last_picture is initialized in vc1_decode_skip_blocks
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/vc1dec.c')
-rw-r--r--libavcodec/vc1dec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index d0566a30a5..4fcc818210 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5143,6 +5143,9 @@ static void vc1_decode_skip_blocks(VC1Context *v)
{
MpegEncContext *s = &v->s;
+ if (!v->s.last_picture.f.data[0])
+ return;
+
ff_er_add_slice(&s->er, 0, s->start_mb_y, s->mb_width - 1, s->end_mb_y - 1, ER_MB_END);
s->first_slice_line = 1;
for (s->mb_y = s->start_mb_y; s->mb_y < s->end_mb_y; s->mb_y++) {