[Libav-user] How do I drop corrupted video frames as a result of network issues

Tuviah Snyder tuviahs at telestream.net
Sun Sep 14 00:54:58 CEST 2014

I have an RTSP server running on an iPhone broadcasting H264 over UDP in a local network and I'm using libavformat, libavcodec to demux it and decode on an application running on the desktop.. For the most part it works well with a second latency, but every minute or so I see a few packets are late, dropped, not received at all and therefore I get a corrupt frame with visible macro blocking. 

Is there any way to detect after decode if the decoder did not have enough information to decode a perfect frame? Don't want AVDecode to try to conceal it, just want to keep feeding in packets to decode, and know if any information was missing, which was required to decode that particular frame. Because our users would rather we never display a corrupt frame, since the iPhone source is just one of many being integrated into a live production (and corrupt frames would lower the overall production value). Instead they want our desktop app to keep displaying the last good frame, until the next good one comes along.


More information about the Libav-user mailing list