Unable to read a specific file H.264 file using Media Foundation Library (Application stall)

Upanita Goswami 1 Reputation point
2020-10-20T21:35:33.197+00:00

I am from MathWorks and using the Media Foundation Library for reading video files on Windows from MATLAB. Recently, a customer of ours reported a H.264 video file that is stalling MATLAB when reading the file. Debugging our code showed that the method ReadSample of IMFSourceReader is blocking the application forever. Is this a known issue and how to workaround the problem? I am attaching the video file with the ticket. Also Windows Media Player cannot open this file either.

The API that is blocking:
IMFSourceReader::ReadSample method from this page https://video2.skills-academy.com/en-us/windows/win32/api/mfreadwrite/nf-mfreadwrite-imfsourcereader-readsample,

Note that we can read many other files correctly using the ReadSample API.

I have the video file but I am unable to attach a .avi file here

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,613 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.