h264: enable low delay only if no delayed frames were seen
authorJanne Grunau <janne-libav@jannau.net>
Fri, 16 Nov 2012 13:31:09 +0000 (14:31 +0100)
committerReinhard Tartler <siretart@tauware.de>
Sat, 12 Jan 2013 18:32:24 +0000 (19:32 +0100)
commit5fa739e685bcbd29dd83139c245935099112beed
tree41c9a2f4fb324c671e091f5612912dc0e1a9e415
parent10ff052c601368f129466e6de19e9862aaaec7d1
h264: enable low delay only if no delayed frames were seen

Dropping frames is undesirable but that is the only way by which the
decoder could return to low delay mode. Instead emit a warning and
continue with delayed frames.
Fixes a crash in fuzzed sample nasa-8s2.ts_s20033 caused by a larger
than expected has_b_frames value. Low delay keeps getting re-enabled
from a presumely broken SPS.

CC: libav-stable@libav.org
(cherry picked from commit 706acb558a38eba633056773280155d66c2f4b24)

Conflicts:

libavcodec/h264.c
libavcodec/h264.c