mirror of https://github.com/mpv-player/mpv
vc1 probing code: if sh_video->bih can't be callocated exit
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21970 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
b5d12d6e0f
commit
6d708c31b6
|
@ -401,6 +401,10 @@ mpeg_header_parser:
|
|||
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue