rtpdec_vp8: Don't return known-broken packets
authorMartin Storsjö <martin@martin.st>
Tue, 11 Dec 2012 13:12:31 +0000 (15:12 +0200)
committerMartin Storsjö <martin@martin.st>
Fri, 21 Dec 2012 12:14:47 +0000 (14:14 +0200)
commitc7d4de3d730473167e31cf765e0333c965f934d3
treef531b6da47c1034260974d49e299a70a6a3d22ad
parent90c784cc13f6bf21a8eb69f3b88b50c7a70f6c59
rtpdec_vp8: Don't return known-broken packets

This is built on the assumption that the first partition of each
VP8 packet is essential for decoding any later packet - if this
partition is broken/missed, the arithmetic coder gets out of sync
and decoding the bitstream in further packet ends up with total
garbage. If packets of a frame are lost, make sure the first
partition is intact (return only this part of the packet, nothing
else), otherwise stop returning data until the next keyframe is
received.

Alternatively, one would simply not return any packets at all
until the next keyframe, if packet loss is detected.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtpdec_vp8.c