diff -ur display.bak/src/ilclient.c display/src/ilclient.c --- display.bak/src/ilclient.c 2012-05-17 13:41:18.097975070 -0400 +++ display/src/ilclient.c 2012-06-19 08:50:52.288898230 -0400 @@ -346,6 +346,8 @@ goto EXIT; } + pAppData->fData = NULL; + /* Initialize application / IL Client callback functions */ /* Callbacks are passed during getHandle call to component, Component uses these callaback to communicate with IL Client */ diff -ur display.bak/src/ilclient.h display/src/ilclient.h --- display.bak/src/ilclient.h 2012-05-17 13:41:18.084974280 -0400 +++ display/src/ilclient.h 2012-06-19 08:50:31.163093842 -0400 @@ -212,6 +212,7 @@ FILE *fIn; FILE *fInFrmSz; FILE *fOut; + OMX_U8 *fData; OMX_COLOR_FORMATTYPE ColorFormat; OMX_U32 displayId; void *fieldBuf; diff -ur display.bak/src/ilclient_utils.c display/src/ilclient_utils.c --- display.bak/src/ilclient_utils.c 2012-05-17 13:41:18.147978098 -0400 +++ display/src/ilclient_utils.c 2012-06-19 09:41:47.553816073 -0400 @@ -415,14 +415,23 @@ /* Setting frame size for SD sized buffer*/ frameSize = (SD_WIDTH * SD_HEIGHT * 3) >> 1; } - - dataRead = fread (pBuf->pBuffer, frameSize, 1, pAppData->fIn); + + if(pAppData->fData == NULL) + { + pAppData->fData = malloc(frameSize); + dataRead = fread(pAppData->fData, frameSize, 1, pAppData->fIn); + //printf("Read %d/%d\n", dataRead, frameSize); + } + + memcpy(pBuf->pBuffer, pAppData->fData, frameSize); + //dataRead = fread (pBuf->pBuffer, frameSize, 1, pAppData->fIn); + //printf("Copying data...\n"); /* Update the buffer header with buffer filled length and alloc length */ - pBuf->nFilledLen = dataRead; + pBuf->nFilledLen = frameSize; - return dataRead; + return frameSize; } /* ========================================================================== */ @@ -826,7 +835,8 @@ mosaicLayout.sMosaicWinFmt[0].winWidth = SD_WIDTH; mosaicLayout.sMosaicWinFmt[0].winHeight = SD_HEIGHT; mosaicLayout.sMosaicWinFmt[0].pitch[VFDC_YUV_INT_ADDR_IDX] = -#endif SD_WIDTH ; + SD_WIDTH ; +#endif } if ((0 == pAppData->displayId) || (1 == pAppData->displayId)) Only in display/src: .ilclient_utils.c.swo