summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2018-11-02 15:53:56 -0400
committerSebastian Dröge <slomo@coaxion.net>2018-11-06 07:26:03 +0000
commit7d1be36561616a9cc483a2fdd6b9e5f1cc1accb9 (patch)
tree170db4c336dc9e46c2a4698ef503cb031362ac77 /gst-libs
parent95c99aa0a765d69049703677ccb4ccd9a34be710 (diff)
downloadgstreamer-plugins-bad-7d1be36561616a9cc483a2fdd6b9e5f1cc1accb9.tar.gz
h265parser: Stop considering 6 bytes NAL complete
This is only TRUE for EOS / EOB NALs. Before this patch, passing any valid 6 bytes of a NAL would make the parser pretend this NAL is complete.
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/codecparsers/gsth265parser.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gst-libs/gst/codecparsers/gsth265parser.c b/gst-libs/gst/codecparsers/gsth265parser.c
index cf7f71f5d..d1dba6062 100644
--- a/gst-libs/gst/codecparsers/gsth265parser.c
+++ b/gst-libs/gst/codecparsers/gsth265parser.c
@@ -1226,7 +1226,12 @@ gst_h265_parser_identify_nalu (GstH265Parser * parser,
gst_h265_parser_identify_nalu_unchecked (parser, data, offset, size,
nalu);
- if (res != GST_H265_PARSER_OK || nalu->size == 2)
+ if (res != GST_H265_PARSER_OK)
+ goto beach;
+
+ /* The two NALs are exactly 2 bytes size and are placed at the end of an AU,
+ * there is no need to wait for the following */
+ if (nalu->type == GST_H265_NAL_EOS || nalu->type == GST_H265_NAL_EOB)
goto beach;
off2 = scan_for_start_codes (data + nalu->offset, size - nalu->offset);