diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-11 02:16:43 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-11 02:26:29 +0200 |
commit | a1fe3b41507300dbaa9a082eb43155f07fcf5124 (patch) | |
tree | b533be646c7fcb0d8b09c6219254ce02a4dfe2e3 | |
parent | c5129da726bb8e2dde610799053736b828989864 (diff) | |
download | ffmpeg-a1fe3b41507300dbaa9a082eb43155f07fcf5124.tar.gz |
avcodec/vc1dec: do not crash when flushing without an allocated frame
Fixes Ticket3837
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6801eb0a0981f113f5f09ed4799d9ae805af62a3)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/vc1dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 06deb7fad6..a73d6150b4 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -5514,7 +5514,7 @@ static void vc1_sprite_flush(AVCodecContext *avctx) Since we can't enforce it, clear to black the missing sprite. This is wrong but it looks better than doing nothing. */ - if (f->data[0]) + if (f && f->data[0]) for (plane = 0; plane < (s->flags&CODEC_FLAG_GRAY ? 1 : 3); plane++) for (i = 0; i < v->sprite_height>>!!plane; i++) memset(f->data[plane] + i * f->linesize[plane], |