This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMX decode_mosaicdisplay demo problem

When running the decode_mosaicdisplay demo alone with p set to 1, things work fine.
./decode_mosaicdisplay_a8host_debug.xv5T -i /usr/share/ti/data/videos/dm816x_1080p_demo.264 -w 1920 -h 1080 -f 60 -p 1 -g 0 -d 0

but if I run the same demo once with p set to 0, later if i run it again with p set back to 1,
the program will stuck after printf ("vswmosaic inport buffers allocated \n");
it can't reach the code printf ("vswmosaic outport buffers allocated \n");

so it seems it stuck in the code
eError = OMX_AllocateBuffer (pAppData->pVswmosaicHandle,  &pAppData->vswmosaicILComp->outPortParams->pOutBuffi], OMX_VSWMOSAIC_OUTPUT_PORT_START_INDEX,  pAppData,  pAppData->vswmosaicILComp->outPortParams->nBufferSize);

why is this happening?

Thanks