[Libav-user] Problem with av_write_frame
Martin Bom
martin.bom at spectator-video.com
Tue Nov 11 10:20:41 CET 2014
Hello,
I have been using the ffmpeg libraries (libavcodec, libavformat, etc.) to encode buffer data retrieved from camera/microphone and stream it over the network to a destination IP address using MPEG-TS and UDP. The encoding and streaming works perfectly, however I seem to encounter a problem with the "av_write_frame" function which is used to write the encoded packet to the output media.
After a seemingly random period of time, the "av_write_frame" function returns the following error:
* An unhandled exception of type 'System.AccessViolationException' occurred in Streamer.dll
* Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Streamer.dll is the C# wrapper I wrote to communicate with the C++ libraries of ffmpeg. This error sometimes occurs after a few minutes of streaming, other times after a much longer period (10-30 minutes). Also, this error occurs at both video and audio encoding, so I haven't been able to pinpoint the exact reason behind this problem. Unfortunately my application crashes every time this error occurs, so it is quite frustrating.
Any help with fixing this issue would be greatly appreciated!
Thanks in advance,
Martin
DISCLAIMER:
This electronic message transmission contains information from Spectator Video Technology Holding B.V. which may be confidential or privileged. The information is intended to be for the use of the individual or entity named above. Be aware that any disclosure, copying, distribution or use of the contents of this information, including attachments, is prohibited without the written consent of Spectator Video Technology Holding B.V.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20141111/39e05c9c/attachment.html>
More information about the Libav-user
mailing list