[vlc-commits] chroma: i420_nv12: check CopyInitCache return value
Thomas Guillem
git at videolan.org
Mon Mar 19 12:15:29 CET 2018
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Mar 14 15:51:33 2018 +0100| [564c6b21a78e652cc2bcd933eea7076e42779610] | committer: Thomas Guillem
chroma: i420_nv12: check CopyInitCache return value
(cherry picked from commit d869a084cd54abe0f5e2dca8cdc262cf53dc4148)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=564c6b21a78e652cc2bcd933eea7076e42779610
---
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