I have a program which uses MediaInfo to get data from media files, optionally direct or via a file access library which works with a buffer. I have noticed a couple of files which open fine in .Open(file) and not properly (no streams found) using the buffer functions.
At first I was going by the web site which checks for 0 as the return value to stop pushing, but I ran a few tests. With some files, I found that once the value returned was (the equivalent of) 5 I would successfully load some mp3 files that I previously didn't load. I have also run some tests where I simply ignore the return and push everything until I run out of file, watching the return value.
Even yet I have an .mp4 file which will load properly with the direct Open call but not the buffer calls. Can I send this file to you via FTP?
Code follows for the open function:
size_t return_code = 0;
return_code = mi.Open(filename);
size_t fileSize = (m_openProc)(m_Utils.utf16ToUtf8(filename).c_str(), m_bufferSize, buffer);
readSize = (m_readProc)(*buffer, m_bufferSize);
size_t bufferPushReturn = mi.Open_Buffer_Continue(*buffer, readSize);
//fprintf(stderr, "size: %lu ret: %lu\n", readSize, bufferPushReturn);
// 5 = size_t representation of bitfield saying it has enough data
if (bufferPushReturn >= 5)
readSize = 0;
} while (readSize > 0);
return_code = 1;
Here is the file in question. Not too large.
Have you had a chance to look into this? I can provide any other information you need.
Should I file this as a bug report?
Sorry for the late answer.
I replied on your bug ticket.