mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
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>
This commit is contained in:
parent
a61b7728b4
commit
5601c87598
1 changed files with 3 additions and 3 deletions
|
@ -675,10 +675,10 @@ gst_h264_parse_collect_nal (GstH264Parse * h264parse, const guint8 * data,
|
||||||
GstH264NalUnit nnalu;
|
GstH264NalUnit nnalu;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (h264parse, "parsing collected nal");
|
GST_DEBUG_OBJECT (h264parse, "parsing collected nal");
|
||||||
parse_res = gst_h264_parser_identify_nalu (h264parse->nalparser, data,
|
parse_res = gst_h264_parser_identify_nalu_unchecked (h264parse->nalparser,
|
||||||
nalu->offset + nalu->size, size, &nnalu);
|
data, nalu->offset + nalu->size, size, &nnalu);
|
||||||
|
|
||||||
if (parse_res == GST_H264_PARSER_ERROR)
|
if (parse_res != GST_H264_PARSER_OK)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* determine if AU complete */
|
/* determine if AU complete */
|
||||||
|
|
Loading…
Reference in a new issue