Ignore prefix NAL unit for slice parsing.

For temporal scalability, prefix NALU contains layer information, but
should not be parsed as a slice.

Bug: webrtc:12991
Change-Id: Ic1e7d41f568310390a743d4ace016aa7d57a4864
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226501
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34523}
This commit is contained in:
Qiu Jianlin 2021-07-20 12:09:15 +08:00 committed by WebRTC LUCI CQ
parent c51efc425d
commit 67468c5b92
2 changed files with 2 additions and 0 deletions

View File

@ -288,6 +288,7 @@ void H264BitstreamParser::ParseSlice(const uint8_t* slice, size_t length) {
}
case H264::NaluType::kAud:
case H264::NaluType::kSei:
case H264::NaluType::kPrefix:
break; // Ignore these nalus, as we don't care about their contents.
default:
Result res = ParseNonParameterSetNalu(slice, length, nalu_type);

View File

@ -42,6 +42,7 @@ enum NaluType : uint8_t {
kEndOfSequence = 10,
kEndOfStream = 11,
kFiller = 12,
kPrefix = 14,
kStapA = 24,
kFuA = 28
};