changeset 21950:647f3be495eb

removed unused variables; replaced wrong call to realloc() with calloc() in vc1 probing code
author nicodvb
date Sat, 20 Jan 2007 13:06:17 +0000
parents 202327a68635
children bd3c871c93d0
files libmpdemux/video.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/video.c	Sat Jan 20 12:17:22 2007 +0000
+++ b/libmpdemux/video.c	Sat Jan 20 13:06:17 2007 +0000
@@ -358,7 +358,6 @@
   break;
  }
  case VIDEO_VC1: {
-   int j;
    // Find sequence_header:
    videobuf_len=0;
    videobuf_code_len=0;
@@ -401,7 +400,7 @@
 
 
    if(mp_vc1_decode_sequence_header(&picture, &videobuffer[4], videobuf_len-4)) {
-     sh_video->bih = (BITMAPINFOHEADER *) realloc(sh_video->bih, sizeof(BITMAPINFOHEADER) + videobuf_len);
+     sh_video->bih = (BITMAPINFOHEADER *) calloc(1, sizeof(BITMAPINFOHEADER) + videobuf_len);
      sh_video->bih->biSize= sizeof(BITMAPINFOHEADER) + videobuf_len;
      memcpy(sh_video->bih + 1, videobuffer, videobuf_len);
      sh_video->bih->biCompression = sh_video->format;
@@ -611,7 +610,6 @@
 	videobuf_len=0;
 
   }  else if((demuxer->file_format==DEMUXER_TYPE_MPEG_PS) && (sh_video->format==mmioFOURCC('W', 'V', 'C', '1'))) {
-       int j;
        while(videobuf_len<VIDEOBUFFER_SIZE-MAX_VIDEO_PACKET_SIZE) {
          int i=sync_video_packet(d_video);
          if(!i) return -1;