src/video/photon/SDL_phyuv.c
changeset 380 bce7171e7a85
parent 370 ba72f259bc88
child 571 8e3ce997621c
     1.1 --- a/src/video/photon/SDL_phyuv.c	Tue May 28 19:24:11 2002 +0000
     1.2 +++ b/src/video/photon/SDL_phyuv.c	Tue May 28 19:31:32 2002 +0000
     1.3 @@ -210,8 +210,10 @@
     1.4      overlay->hwdata->screen_width = 1024;
     1.5      overlay->hwdata->screen_height  = 768;
     1.6  
     1.7 -    overlay->hwdata->FrameData0 = (FRAMEDATA *) malloc((size_t)(sizeof( FRAMEDATA)));
     1.8 -    overlay->hwdata->FrameData1 = (FRAMEDATA *) malloc((size_t)(sizeof( FRAMEDATA)));
     1.9 +    overlay->hwdata->FrameData0 = (FRAMEDATA *) malloc((size_t)(sizeof(FRAMEDATA)));
    1.10 +    overlay->hwdata->FrameData1 = (FRAMEDATA *) malloc((size_t)(sizeof(FRAMEDATA)));
    1.11 +    memset(overlay->hwdata->FrameData0, 0x00, (size_t)(sizeof(FRAMEDATA)));
    1.12 +    memset(overlay->hwdata->FrameData1, 0x00, (size_t)(sizeof(FRAMEDATA)));
    1.13  
    1.14      overlay->hwdata->caps.size = sizeof(overlay->hwdata->caps);
    1.15  
    1.16 @@ -493,7 +495,7 @@
    1.17  	//Lock gets the pointer and passes it to the app. The app writes all yuv data into overlay->pixels
    1.18  //Note this is defined as Uint8 **pixels;				/* Read-write */	
    1.19  	overlay->pixels = &overlay->hwdata->CurrentFrameData->Y; 
    1.20 -	overlay->pitches  = &overlay->hwdata->YStride;
    1.21 +	overlay->pitches = (Uint16*) &(overlay->hwdata->YStride);
    1.22  		
    1.23  	return(0);
    1.24  }