From daa31ef05c2fbe50bbc1db03f25fdaa8027edf9f Mon Sep 17 00:00:00 2001 From: nicodvb Date: Fri, 12 May 2006 22:33:42 +0000 Subject: [PATCH] allocate correct extradata size git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18465 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_ts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmpdemux/demux_ts.c b/libmpdemux/demux_ts.c index 6e04ddbe61..40890b915b 100644 --- a/libmpdemux/demux_ts.c +++ b/libmpdemux/demux_ts.c @@ -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);