diff options
author | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2014-06-24 13:55:13 +0200 |
---|---|---|
committer | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2014-07-01 16:26:48 +0200 |
commit | 5601c875989df92373abf72ba7c89091244c6f6d (patch) | |
tree | f8b2322b11e2109cb76de32e50a8fb2ad15c7261 /gst | |
parent | a61b7728b4d03f61c130d5b5df67e1903fe84a3b (diff) |
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>
Diffstat (limited to 'gst')
-rw-r--r-- | gst/videoparsers/gsth264parse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c index c14784a6f..a32063ee3 100644 --- a/gst/videoparsers/gsth264parse.c +++ b/gst/videoparsers/gsth264parse.c @@ -675,10 +675,10 @@ gst_h264_parse_collect_nal (GstH264Parse * h264parse, const guint8 * data, GstH264NalUnit nnalu; GST_DEBUG_OBJECT (h264parse, "parsing collected nal"); - parse_res = gst_h264_parser_identify_nalu (h264parse->nalparser, data, - nalu->offset + nalu->size, size, &nnalu); + parse_res = gst_h264_parser_identify_nalu_unchecked (h264parse->nalparser, + data, nalu->offset + nalu->size, size, &nnalu); - if (parse_res == GST_H264_PARSER_ERROR) + if (parse_res != GST_H264_PARSER_OK) return FALSE; /* determine if AU complete */ |