changeset 18464:4fd5519c1526

allocate correct extradata size
author nicodvb
date Fri, 12 May 2006 22:33:42 +0000
parents 11f8e670d7d3
children c3c68110f601
files libmpdemux/demux_ts.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_ts.c	Fri May 12 22:23:37 2006 +0000
+++ b/libmpdemux/demux_ts.c	Fri May 12 22:33:42 2006 +0000
@@ -923,7 +923,7 @@
 		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);