[vlc-commits] avcodec: missing error handling (refs #8792)
Rémi Denis-Courmont
git at videolan.org
Wed Jun 12 19:27:20 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jun 12 20:22:54 2013 +0300| [ad26976eb0ad16063366b7d600161dee787abf14] | committer: Rémi Denis-Courmont
avcodec: missing error handling (refs #8792)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ad26976eb0ad16063366b7d600161dee787abf14
---
modules/codec/avcodec/encoder.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 9523e32..95b86a3 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -926,6 +926,8 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
p_enc->fmt_out.video.i_bits_per_pixel / 8 : 3;
const int blocksize = __MAX( FF_MIN_BUFFER_SIZE,bytesPerPixel * p_sys->p_context->height * p_sys->p_context->width + 200 );
block_t *p_block = block_Alloc( blocksize );
+ if( unlikely(p_block == NULL) )
+ return NULL;
#if (LIBAVCODEC_VERSION_MAJOR >= 54)
AVPacket av_pkt;
More information about the vlc-commits
mailing list