diff --git a/libavcodec/xan.c b/libavcodec/xan.c index f21075c3bf..9e58a77f19 100644 --- a/libavcodec/xan.c +++ b/libavcodec/xan.c @@ -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;