allocate correct extradata size

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18465 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nicodvb 2006-05-12 22:33:42 +00:00
parent b4b1d58237
commit daa31ef05c
1 changed files with 1 additions and 1 deletions

View File

@ -923,7 +923,7 @@ static demuxer_t *demux_open_ts(demuxer_t * demuxer)
if(params.vtype == VIDEO_AVC && es->extradata && es->extradata_len)
{
int w = 0, h = 0;
sh_video->bih = (BITMAPINFOHEADER *) calloc(1, sizeof(BITMAPINFOHEADER) + 4096);
sh_video->bih = (BITMAPINFOHEADER *) calloc(1, sizeof(BITMAPINFOHEADER) + es->extradata_len);
sh_video->bih->biSize= sizeof(BITMAPINFOHEADER) + es->extradata_len;
sh_video->bih->biCompression = params.vtype;
memcpy(sh_video->bih + 1, es->extradata, es->extradata_len);