h264: ignore filler NALs, print NAL type on bitstream parsing errors

BUG=None

Change-Id: Idbde6c18a4dfb6ed6d62abb33f9b9178ef0c64b5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364123
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43173}
This commit is contained in:
Philipp Hancke 2024-09-30 09:35:55 -07:00 committed by WebRTC LUCI CQ
parent b23b3dd9b1
commit 5da0f2ef2a

View File

@ -325,13 +325,15 @@ void H264BitstreamParser::ParseSlice(rtc::ArrayView<const uint8_t> slice) {
break;
}
case H264::NaluType::kAud:
case H264::NaluType::kFiller:
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, nalu_type);
if (res != kOk)
RTC_DLOG(LS_INFO) << "Failed to parse bitstream. Error: " << res;
RTC_DLOG(LS_INFO) << "Failed to parse bitstream. NAL type "
<< static_cast<int>(nalu_type) << ", error: " << res;
break;
}
}