why my application freezes when reading a nvenc-h264 encoded video file in Windows 10 but not on windows 11
Hi Everyone,
I have the video file with the following details:
General Complete name : D:\this_video_causes_error.avi Format : AVI Format/Info : Audio Video Interleave File size : 16.7 MiB Duration : 1 min 0 s Overall bit rate mode : Variable Overall bit rate : 2 336 kb/s Frame rate : 60.000 FPS Writing application : VLC Media Player - 3.0.20 Vetinari Video ID : 0 Format : AVC Format/Info : Advanced Video Codec *** Email address is removed for privacy *** Format settings, CABAC : No Format settings, Reference frames : 3 frames Codec ID : H264 Duration : 1 min 0 s Bit rate mode : Variable Bit rate : 2 325 kb/s Maximum bit rate : 2 000 kb/s Width : 2 816 pixels Height : 1 408 pixels Display aspect ratio : 2.000 Frame rate : 60.000 FPS Color space : YUV Chroma subsampling : 4:4:4 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.010 Stream size : 16.6 MiB (99%) Color range : Full Matrix coefficients : Identity ColorSpace_Original : RGB
I have encountered an issue while using the Media Foundation library API to read a file on Windows 10. When I call the IMFSourceReader::ReadSample function, my application gets stuck in an indefinite processing stage and does not return anything. The function I'm using is as follows:
ReadSample( MF_SOURCE_READER_FIRST_VIDEO_STREAM, // Stream index. 0, // Flags. &streamIndex, // Receives the actual stream index. &flags, // Receives status flags. &timeStamp, // Receives the time stamp. decodedSample // Receives the sample or NULL. );
Interestingly, the same application does not encounter the indefinite stage issue on Windows 11. Furthermore, the video file is not playable using the Windows Media Player on both Windows 10 and 11 due to the codec.
Why the IMFSourceReader::ReadSample function does not return anything on windows 10?
Windows development | Windows API - Win32
Windows for business | Windows Client for IT Pros | User experience | Other
Developer technologies | C++
1 answer
Sort by: Most helpful
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more