mirror of https://github.com/mpv-player/mpv
allocate correct extradata size
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18465 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
b4b1d58237
commit
daa31ef05c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue