aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2014-10-04 12:40:35 +0200
committerLuca Barbato <lu_zero@gentoo.org>2014-12-19 17:58:22 +0100
commit3ea49fc5081d63277ecbc12ed440af4b02ddfdf9 (patch)
tree50bff512b1b39b716479142b47a55cbd8e2aadc4
parent864c0c50eb0e7a112b20007459b0cb94b61cb8d3 (diff)
downloadffmpeg-3ea49fc5081d63277ecbc12ed440af4b02ddfdf9.tar.gz
vc1: Do not assume seek happens after decoding
If a seek is requested before the decoding start there is no current picture. CC: libav-stable@libav.org (cherry picked from commit 3e348ecfc6ab1830e43288a9e12e8f0a000afbcb) Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
-rw-r--r--libavcodec/vc1dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 8ad4f0f7de..4c9ff036c3 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5503,7 +5503,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],