[FFmpeg-cvslog] vc1: Do not assume seek happens after decoding

Luca Barbato git at videolan.org
Sun Oct 5 03:06:29 CEST 2014


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Sat Oct  4 12:40:35 2014 +0200| [68211c70afcfd4d675029cc85fba7dee8de53bdf] | committer: Luca Barbato

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 at libav.org

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=68211c70afcfd4d675029cc85fba7dee8de53bdf
---

 libavcodec/vc1dec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 41beaeb..7eb8549 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],



More information about the ffmpeg-cvslog mailing list