diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2014-01-06 14:52:54 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-01-06 14:52:54 +0100 |
commit | 63fee31a3f95021fa0bb2429c723f5356c9b3c4b (patch) | |
tree | 7dd04df840245b646684f5f466faed03ddbd3a8b /gst/videoparsers | |
parent | 57c195eed8de53ee4552d59f5f3a752475df7908 (diff) | |
download | gstreamer-plugins-bad-63fee31a3f95021fa0bb2429c723f5356c9b3c4b.tar.gz |
h265parse: Allows hvc1 version 0 and fix reading of NAL count in codec_data
Diffstat (limited to 'gst/videoparsers')
-rw-r--r-- | gst/videoparsers/gsth265parse.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gst/videoparsers/gsth265parse.c b/gst/videoparsers/gsth265parse.c index 8afdfe3b8..95ca9284c 100644 --- a/gst/videoparsers/gsth265parse.c +++ b/gst/videoparsers/gsth265parse.c @@ -1771,8 +1771,9 @@ gst_h265_parse_set_caps (GstBaseParse * parse, GstCaps * caps) gst_buffer_unmap (codec_data, &map); goto hvcc_too_small; } - /* parse the version, this must be one */ - if (data[0] != 1) { + /* parse the version, this must be one but + * is zero until the spec is finalized */ + if (data[0] != 0 && data[0] != 1) { gst_buffer_unmap (codec_data, &map); goto wrong_version; } @@ -1783,7 +1784,7 @@ gst_h265_parse_set_caps (GstBaseParse * parse, GstCaps * caps) off = 23; for (i = 0; i < data[22]; i++) { - num_nals = (data[off + 1] >> 7) | data[off + 2]; + num_nals = GST_READ_UINT16_BE (data + off + 1); for (j = 0; j < num_nals; j++) { parseres = gst_h265_parser_identify_nalu_hevc (h265parse->nalparser, data, off + 3, size, 2, &nalu); |