# HG changeset patch # User nicodvb # Date 1147473222 0 # Node ID 4fd5519c152650a648adeaadf35519b3d3d96bd4 # Parent 11f8e670d7d3b3c2729ecfb6a492164d725ca0f3 allocate correct extradata size diff -r 11f8e670d7d3 -r 4fd5519c1526 libmpdemux/demux_ts.c --- 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);