mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-02 00:32:43 +00:00
h264parse: avoid additional NAL parsing if no AU collection is needed
This commit is contained in:
parent
9db239e1ec
commit
e12044c359
1 changed files with 4 additions and 4 deletions
|
@ -539,6 +539,10 @@ gst_h264_parse_collect_nal (GstH264Parse * h264parse, const guint8 * data,
|
||||||
GstH264NalUnitType nal_type = nalu->type;
|
GstH264NalUnitType nal_type = nalu->type;
|
||||||
GstH264NalUnit nnalu;
|
GstH264NalUnit nnalu;
|
||||||
|
|
||||||
|
if (h264parse->align == GST_H264_PARSE_ALIGN_NAL) {
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
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 (h264parse->nalparser, data,
|
||||||
nalu->offset + nalu->size, size, &nnalu);
|
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)
|
if (parse_res == GST_H264_PARSER_ERROR)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (h264parse->align == GST_H264_PARSE_ALIGN_NAL) {
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* determine if AU complete */
|
/* determine if AU complete */
|
||||||
GST_LOG_OBJECT (h264parse, "nal type: %d", nal_type);
|
GST_LOG_OBJECT (h264parse, "nal type: %d", nal_type);
|
||||||
/* coded slice NAL starts a picture,
|
/* coded slice NAL starts a picture,
|
||||||
|
|
Loading…
Reference in a new issue