Fix undefined behavior in Y4M header parsing The OpenY4mFile function parses the video header by tokenizing the string with spaces. If a header contains consecutive spaces (e.g., "W100 H100"), the tokenizer produces empty strings. Currently, the code calls `field.front()` on these empty strings. Accessing `front()` on an empty container is Undefined Behavior in C++ and can cause crashes on strict platforms. This CL adds a check to explicitly skip empty fields, making the parser robust against extra whitespace. Bug: None Test: Verified locally by parsing a Y4M header with double spaces. Change-Id: Icb477d722fb496a055daecdf1f1007cfd43fe9d0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/447000 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#46846}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.
See here for instructions on how to get started developing with the native code.
Authoritative list of directories that contain the native API header files.