h264: improve parsing of broken AVC SPS
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 1 Oct 2011 15:41:28 +0000 (17:41 +0200)
committerJanne Grunau <janne-libav@jannau.net>
Mon, 12 Mar 2012 23:31:52 +0000 (00:31 +0100)
commit3aa661ec561d7a20812b84b353b0d7855ac346c8
tree0c97713f0ffa409754ddc099251ed19f82382749
parentbd3e07c82ae558c2cc3616115161827630826ec1
h264: improve parsing of broken AVC SPS

Parsing the entire NAL as SPS fixes decoding of some AVC bitstreams
with broken escaping. Since the size of the NAL unit is known and
checked against the buffer end we can parse it entirely without buffer
overreads.

Fixes playback of
http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
libavcodec/h264.c
libavcodec/h264_ps.c