[FFmpeg-devel] [PATCH 7/7] Prevent NULL dereferences when missing the reference frame in the xan decoder.
fenrir at elivagar.org
fenrir at elivagar.org
Tue Sep 27 23:43:57 CEST 2011
From: Laurent Aimar <fenrir at videolan.org>
---
libavcodec/xan.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavcodec/xan.c b/libavcodec/xan.c
index 2a66b65..1b288ee 100644
--- a/libavcodec/xan.c
+++ b/libavcodec/xan.c
@@ -226,6 +226,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;
--
1.7.2.5
More information about the ffmpeg-devel
mailing list