h264parse: avoid additional NAL parsing if no AU collection is needed

This commit is contained in:
Mark Nauwelaerts 2011-11-18 15:10:57 +01:00
parent 9db239e1ec
commit e12044c359

View file

@ -539,6 +539,10 @@ gst_h264_parse_collect_nal (GstH264Parse * h264parse, const guint8 * data,
GstH264NalUnitType nal_type = nalu->type;
GstH264NalUnit nnalu;
if (h264parse->align == GST_H264_PARSE_ALIGN_NAL) {
return TRUE;
}
GST_DEBUG_OBJECT (h264parse, "parsing collected nal");
parse_res = gst_h264_parser_identify_nalu (h264parse->nalparser, data,
nalu->offset + nalu->size, size, &nnalu);
@ -546,10 +550,6 @@ gst_h264_parse_collect_nal (GstH264Parse * h264parse, const guint8 * data,
if (parse_res == GST_H264_PARSER_ERROR)
return FALSE;
if (h264parse->align == GST_H264_PARSE_ALIGN_NAL) {
return TRUE;
}
/* determine if AU complete */
GST_LOG_OBJECT (h264parse, "nal type: %d", nal_type);
/* coded slice NAL starts a picture,