xan: Prevent NULL dereferences with missing reference frame

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
(cherry picked from commit 06be075cda0a6ba8bab8f543571b380884f562ac)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
Laurent Aimar 2011-09-27 22:15:32 +00:00 committed by Reinhard Tartler
parent c5766b55c4
commit fb20141563

View File

@ -224,6 +224,8 @@ static inline void xan_wc3_copy_pixel_run(XanContext *s,
palette_plane = s->current_frame.data[0];
prev_palette_plane = s->last_frame.data[0];
if (!prev_palette_plane)
prev_palette_plane = palette_plane;
stride = s->current_frame.linesize[0];
line_inc = stride - width;
curframe_index = y * stride + x;