aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-09-27 23:43:57 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-01 20:44:40 +0200
commit6b0565e5b8f4a39e8348cbb61c21727d098013a5 (patch)
tree3324d4e3c669f0ad5ac454b927aebc8c7f542c10
parent23197f546762e906837fb3293ce8243852b294dd (diff)
downloadffmpeg-6b0565e5b8f4a39e8348cbb61c21727d098013a5.tar.gz
Prevent NULL dereferences when missing the reference frame in the xan decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 19e95b88459e879d3e67a66350d937c32ed762ca)
-rw-r--r--libavcodec/xan.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/xan.c b/libavcodec/xan.c
index 357593bf2d..404f4d10c6 100644
--- a/libavcodec/xan.c
+++ b/libavcodec/xan.c
@@ -222,6 +222,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;