GNOME Bugzilla – Bug 732154
h264parse: fix and optimize NAL collection function
Last modified: 2014-07-04 12:57:28 UTC
Use gst_h264_parser_identify_nalu_unchecked() to identify the next NAL unit. We don't want to parse the full NAL unit, but only the header bytes and possibly the first RBSP byte for identifying the first_mb_in_slice syntax element. Also fix check for failure when returning from that function. The only success condition for that is GST_H264_PARSER_OK, so use it. BTW, I think that function is a misnomer. My understanding is that the function is used to determine access unit boundaries, not NAL boundaries.
Created attachment 279111 [details] [review] h264parse: fix and optimize NAL collection function
Note: the optimization part is that we scan for start codes only once (start), not twice since we don't really care the next NAL is complete or not. We only need the initial header bytes + one byte from RBSP.
commit 5601c875989df92373abf72ba7c89091244c6f6d Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com> Date: Tue Jun 24 13:55:13 2014 +0200 h264parse: fix and optimize NAL collection function. Use gst_h264_parser_identify_nalu_unchecked() to identify the next NAL unit. We don't want to parse the full NAL unit, but only the header bytes and possibly the first RBSP byte for identifying the first_mb_in_slice syntax element. Also fix check for failure when returning from that function. The only success condition for that is GST_H264_PARSER_OK, so use it. https://bugzilla.gnome.org/show_bug.cgi?id=732154 Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>