h264parse: improve conditions for skipping NAL units.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Wed, 25 Jun 2014 11:14:10 +0000 (13:14 +0200)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Tue, 1 Jul 2014 14:41:19 +0000 (16:41 +0200)
commit0f9f7c94ceaa206362ba4573702a965624bdba0e
tree7227ee7ee7a6396c6a1483efaa69d301f2528371
parent9ffb25cbc0eca03116c7368b065ec4d9b537e987
h264parse: improve conditions for skipping NAL units.

Carefully track cases when skipping broken or invalid NAL units is
necessary. In particular, always allow NAL units to be processed
and let that gst_h264_parse_process_nal() function decide on whether
the current NAL needs to be dropped or not.

This fixes parsing of streams with SEI NAL buffering_period() message
inserted between SPS and PPS, or SPS-Ext NAL following a traditional
SPS NAL unit, among other cases too.

Practical examples from the H.264 AVC conformance suite include
alphaconformanceG, CVSE2_Sony_B, CVSE3_Sony_H, CVSEFDFT3_Sony_E
when parsing in stream-format=byte-stream,alignment=au mode.

https://bugzilla.gnome.org/show_bug.cgi?id=732203

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
gst/videoparsers/gsth264parse.c