From 5da0f2ef2a247da9835bc894a6c2e5517e887b4b Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Mon, 30 Sep 2024 09:35:55 -0700 Subject: [PATCH] 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 Commit-Queue: Philipp Hancke Reviewed-by: Danil Chapovalov Cr-Commit-Position: refs/heads/main@{#43173} --- common_video/h264/h264_bitstream_parser.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common_video/h264/h264_bitstream_parser.cc b/common_video/h264/h264_bitstream_parser.cc index 96be4c8024..56158fd340 100644 --- a/common_video/h264/h264_bitstream_parser.cc +++ b/common_video/h264/h264_bitstream_parser.cc @@ -325,13 +325,15 @@ void H264BitstreamParser::ParseSlice(rtc::ArrayView 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(nalu_type) << ", error: " << res; break; } }