aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/xan.c
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-09-27 22:15:32 +0000
committerJanne Grunau <janne-libav@jannau.net>2011-10-07 16:25:31 +0200
commit06be075cda0a6ba8bab8f543571b380884f562ac (patch)
tree4739b6498aacefaefd1017ee23d95700e2c9373b /libavcodec/xan.c
parentc7e631986b4a326a71a20a1a51000f3fbf6e64e7 (diff)
downloadffmpeg-06be075cda0a6ba8bab8f543571b380884f562ac.tar.gz
xan: Prevent NULL dereferences with missing reference frame
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Diffstat (limited to 'libavcodec/xan.c')
-rw-r--r--libavcodec/xan.c2
1 files changed, 2 insertions, 0 deletions
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;