[vlc-commits] chroma: i420_nv12: check CopyInitCache return value
Thomas Guillem
git at videolan.org
Fri Mar 16 16:08:22 CET 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Mar 14 15:51:33 2018 +0100| [d869a084cd54abe0f5e2dca8cdc262cf53dc4148] | committer: Thomas Guillem
chroma: i420_nv12: check CopyInitCache return value
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d869a084cd54abe0f5e2dca8cdc262cf53dc4148
---
modules/video_chroma/i420_nv12.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/video_chroma/i420_nv12.c b/modules/video_chroma/i420_nv12.c
index 6b62284a1b..f43e500ef6 100644
--- a/modules/video_chroma/i420_nv12.c
+++ b/modules/video_chroma/i420_nv12.c
@@ -214,8 +214,10 @@ static int Create( vlc_object_t *p_this )
if (!p_sys)
return VLC_ENOMEM;
- CopyInitCache( &p_sys->cache, ( p_filter->fmt_in.video.i_x_offset +
- p_filter->fmt_in.video.i_visible_width ) * pixel_bytes );
+ if( CopyInitCache( &p_sys->cache, ( p_filter->fmt_in.video.i_x_offset +
+ p_filter->fmt_in.video.i_visible_width ) * pixel_bytes ) )
+ return VLC_ENOMEM;
+
p_filter->p_sys = p_sys;
return 0;
More information about the vlc-commits
mailing list