[MPlayer-cvslog] r37880 - trunk/libmpcodecs/vd_ffmpeg.c
reimar
subversion at mplayerhq.hu
Fri Jul 22 00:54:11 EEST 2016
Author: reimar
Date: Thu Jul 21 23:54:11 2016
New Revision: 37880
Log:
vd_ffmpeg: check for malloc failure.
Modified:
trunk/libmpcodecs/vd_ffmpeg.c
Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c Thu Jul 21 23:50:00 2016 (r37879)
+++ trunk/libmpcodecs/vd_ffmpeg.c Thu Jul 21 23:54:11 2016 (r37880)
@@ -476,6 +476,10 @@ static int init(sh_video_t *sh){
break;
avctx->extradata_size = sh->bih->biSize-sizeof(*sh->bih);
avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
+ if (!avctx->extradata) {
+ avctx->extradata_size = 0;
+ break;
+ }
memcpy(avctx->extradata, sh->bih+1, avctx->extradata_size);
break;
}
More information about the MPlayer-cvslog
mailing list