[MPlayer-cvslog] r21970 - trunk/libmpdemux/video.c
nicodvb
subversion at mplayerhq.hu
Sat Jan 20 14:14:09 CET 2007
Author: nicodvb
Date: Sat Jan 20 14:14:09 2007
New Revision: 21970
Modified:
trunk/libmpdemux/video.c
Log:
vc1 probing code: if sh_video->bih can't be callocated exit
Modified: trunk/libmpdemux/video.c
==============================================================================
--- trunk/libmpdemux/video.c (original)
+++ trunk/libmpdemux/video.c Sat Jan 20 14:14:09 2007
@@ -401,6 +401,10 @@
if(mp_vc1_decode_sequence_header(&picture, &videobuffer[4], videobuf_len-4)) {
sh_video->bih = (BITMAPINFOHEADER *) calloc(1, sizeof(BITMAPINFOHEADER) + videobuf_len);
+ if(sh_video->bih == NULL) {
+ mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Couldn't alloc %d bytes for VC-1 extradata!\n", sizeof(BITMAPINFOHEADER) + videobuf_len);
+ return 0;
+ }
sh_video->bih->biSize= sizeof(BITMAPINFOHEADER) + videobuf_len;
memcpy(sh_video->bih + 1, videobuffer, videobuf_len);
sh_video->bih->biCompression = sh_video->format;
More information about the MPlayer-cvslog
mailing list