missing detections using buffer opens vs direct

Help
Marc
2013-01-03
2013-01-24
  • Marc
    Marc
    2013-01-03

    Me again!

    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?

    Thanks,
    Marc

    Code follows for the open function:
    :::C++

        size_t return_code = 0;
        if (!m_usingAccessLibrary)
        {
            return_code = mi.Open(filename);
        }
        else
        {
            mi.Option(_T("File_IsSeekable"), _T("0"));
    
            size_t fileSize = (m_openProc)(m_Utils.utf16ToUtf8(filename).c_str(), m_bufferSize, buffer);
            mi.Open_Buffer_Init(fileSize, 0);
            size_t readSize;
            do
            {
                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);
    
            mi.Open_Buffer_Finalize();
    
            return_code = 1;
    
        }
    
        return return_code;
    
     
  • Marc
    Marc
    2013-01-03

    Here is the file in question. Not too large.

     
  • Marc
    Marc
    2013-01-10

    Hello,

    Have you had a chance to look into this? I can provide any other information you need.

    Thanks,
    Marc

     
  • Marc
    Marc
    2013-01-18

    Hello,

    Should I file this as a bug report?

    Thanks,
    Marc

     
  • Sorry for the late answer.
    I replied on your bug ticket.