[vlc-commits] commit: Fixed a allocation failure test in swscale. (Laurent Aimar )
git at videolan.org
git at videolan.org
Sun Oct 31 13:05:29 CET 2010
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Oct 31 12:41:02 2010 +0100| [429232b99c5452f0d7e8c8b1b203e5d61431600e] | committer: Laurent Aimar
Fixed a allocation failure test in swscale.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=429232b99c5452f0d7e8c8b1b203e5d61431600e
---
modules/video_filter/swscale.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/video_filter/swscale.c b/modules/video_filter/swscale.c
index 9a17c48..77644d0 100644
--- a/modules/video_filter/swscale.c
+++ b/modules/video_filter/swscale.c
@@ -405,8 +405,10 @@ static int Init( filter_t *p_filter )
p_sys->p_src_e = picture_New( p_fmti->i_chroma, i_fmti_width, p_fmti->i_height, 0, 1 );
p_sys->p_dst_e = picture_New( p_fmto->i_chroma, i_fmto_width, p_fmto->i_height, 0, 1 );
- memset( p_sys->p_src_e->p[0].p_pixels, 0, p_sys->p_src_e->p[0].i_pitch * p_sys->p_src_e->p[0].i_lines );
- memset( p_sys->p_dst_e->p[0].p_pixels, 0, p_sys->p_dst_e->p[0].i_pitch * p_sys->p_dst_e->p[0].i_lines );
+ if( p_sys->p_src_e )
+ memset( p_sys->p_src_e->p[0].p_pixels, 0, p_sys->p_src_e->p[0].i_pitch * p_sys->p_src_e->p[0].i_lines );
+ if( p_sys->p_dst_e )
+ memset( p_sys->p_dst_e->p[0].p_pixels, 0, p_sys->p_dst_e->p[0].i_pitch * p_sys->p_dst_e->p[0].i_lines );
}
if( !p_sys->ctx ||
More information about the vlc-commits
mailing list