Hi,
I have a media file that causes ReadSample to hang indefinitely when reading from the audio channel of a video file. This appears to be happening at the end of the stream. It successfully reads 156s of samples from the stream before hanging, yet the stream metadata says it is only 137s long.
Code snippet, sorry about the formatting.
hr =
pReader->ReadSample((DWORD)MF_SOURCE_READER_FIRST_AUDIO_STREAM, 0, NULL,&dwFlags, NULL,&pSample ); if (FAILED(hr)) { break; } if (dwFlags & MF_SOURCE_READERF_CURRENTMEDIATYPECHANGED) { printf("Type change - not supported by WAVE file format.\n"); break; } bool atEof=false; if (dwFlags & MF_SOURCE_READERF_ENDOFSTREAM) { //printf("End of input file.\n"); atEof=true; }