[Libav-user] Segfault on corrupted video

Tim Pitman tapitman11 at gmail.com
Tue Jun 26 21:28:28 CEST 2012


I'm experimenting with transmitting h264 over a lossy channel. On the
receiver side I have a very simple libav/opengl video player that
takes the stream and feeds it to avcodec_decode_video2 one NALU at a
time. There are lots of errors but mostly they just result in
artifacts, which is exactly what I want to happen. However, when the
channel is bad libav segfaults with:

mmco: unref short failure

I was wondering if anyone has a guess as to how I can avoid this
crashing. I don't care if the video looks horrible, I just want it to
keep going and recover when the channel improves again.

I have several ideas that I was going to try:
1) Make my video player NALU aware and checksum each NALU, throwing
out bad ones.
2) Make my video player frame-aware and throw out bad frames.

If I knew what it was about the NALU's that are crashing libav, I
would just get rid of those ones and be done with it.

I'm also planning to do some simple FEC, probably at the NALU level,
which will help as well.

Thanks,
Tim


More information about the Libav-user mailing list