[vlc-commits] codec: jpeg: Check for NULL p_pic before encoding
Hugo Beauzée-Luyssen
git at videolan.org
Wed Feb 5 23:04:52 CET 2014
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Feb 5 21:36:23 2014 +0200| [bba3b522576349cd4a85abb3cd4e87d6b01386ac] | committer: Hugo Beauzée-Luyssen
codec: jpeg: Check for NULL p_pic before encoding
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bba3b522576349cd4a85abb3cd4e87d6b01386ac
---
modules/codec/jpeg.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/codec/jpeg.c b/modules/codec/jpeg.c
index 3dbc035..5ad8c64 100644
--- a/modules/codec/jpeg.c
+++ b/modules/codec/jpeg.c
@@ -332,6 +332,10 @@ static block_t *EncodeBlock(encoder_t *p_enc, picture_t *p_pic)
{
encoder_sys_t *p_sys = p_enc->p_sys;
+ if (unlikely(!p_pic))
+ {
+ return NULL;
+ }
block_t *p_block = block_Alloc(p_sys->i_blocksize);
if (p_block == NULL)
{
More information about the vlc-commits
mailing list