[FFmpeg-cvslog] Prevent NULL dereferences when missing the reference frame in the xan decoder .
Laurent Aimar
git at videolan.org
Sat Oct 1 21:38:53 CEST 2011
ffmpeg | branch: release/0.8 | Laurent Aimar <fenrir at videolan.org> | Tue Sep 27 23:43:57 2011 +0200| [6b0565e5b8f4a39e8348cbb61c21727d098013a5] | committer: Michael Niedermayer
Prevent NULL dereferences when missing the reference frame in the xan decoder.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 19e95b88459e879d3e67a66350d937c32ed762ca)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6b0565e5b8f4a39e8348cbb61c21727d098013a5
---
libavcodec/xan.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavcodec/xan.c b/libavcodec/xan.c
index 357593b..404f4d1 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;
More information about the ffmpeg-cvslog
mailing list