• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Is a serious bug in opencore????

I am porting the media function to our mobile solution. and out AP has hardware video codec, after the HW codec has integrated to opencore , and then test it.

However, there is a serious problem . When the 3gp file whose video format is H264 playing for long time ,the decoder will fail. And the failed position is not the same ,and the memory address is also not the same in every failed times.

Then I debug the error,find that the data transform to decoder is error. There are has only serveral bytes(sometimes only about 2bytes )errror.

The data is come from mp4 parser node, then I found that the source data read form media file is in "oscl_file_native.cpp", and the statement is :
ret=fread(buffer, OSCL_STATIC_CAST(int32, size), OSCL_STATIC_CAST(int32, numelements), iFile);

and the buffer is allocated in the oscl_file_cache.cpp file used :
_pCacheBufferStart = (uint8*)OSCL_MALLOC(_cacheSize);

and then the data in _pCacheBufferStart copy to another buffer which is used to tranform data to mp4 parser node through:
memcpy(destBuf, _pCacheBufferStart + _currentCachePos, thisRead);


Theoretically,the data in pCacheBufferStart+currentCachePos is same as destBuf ,however , actually the data in two buffer is not same and has several changes!!!!!

I don't know why . Because ,in other solution whose hardware has some changes but AP is same, and the opencore is same ,the driver is same ,can worked successfully.


But, in my solution, the media file playing will caused some errors if the file is playing for a long time!

can Someone tell me why? It is the opencore bug??? Are there some wild pointers in opencore???
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones