avcodec/h264: Fix for H.264 configuration parsing
authorIvan <grigoriev.ivan.a@gmail.com>
Tue, 12 Apr 2016 20:32:04 +0000 (16:32 -0400)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 1 May 2016 03:00:45 +0000 (05:00 +0200)
commit2bb9f5d6074a08c9b7c1567c463e6cc3cdf2b450
treeaf29a905127c32c2bf1da46e513f712000f6a8df
parent1e46629234aa19f3ad1e94d220cd90510ae58ca6
avcodec/h264: Fix for H.264 configuration parsing

Sometimes video fails to decode if H.264 configuration changes mid stream.
The reason is that configuration parser assumes that nal_ref_idc is equal to 11b
while actually some codecs but 01b there. The H.264 spec is somewhat
vague about this but it looks like it allows any non-zero nal_ref_idc for sps/pps.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3a727606c474d3d0b9efa3c900294a84bdb5e331)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/h264.c