Media Foundation Write Sample gives Access Violation while writing


I followed this Documentation and tried to create a video sample using a few bitmapImages . However after the below line there is a Exception.

The Bitmap Image is sent to the WriteFrame() function of format byte [] array format which is similar to VideosourceFrame but in DWORD format in the tutorial.

pSinkWriter->WriteSample(streamIndex, spSample));

The Exception after this line is

     Exception thrown at 0x00007FFCE9A9DF33 (ntdll.dll) in Movie.exe: 0xC0000005: Access violation writing location 0x0000000000000024.

The run time values of the writer, sample, buffer : just before the Exception

Media Buffer

Media sample

Media SinkWriter callstack after the call to Writesample

Any leads would be helpful.

asked on Stack Overflow May 20, 2020 by Dheena Dayalan • edited May 21, 2020 by Dheena Dayalan

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0