GrowthEase / LLS-Player

低延时直播(Low-Latency Streaming,LLS)是网易云信推出的低延时、强同步、高质量的直播产品。低延时直播产品基于云信 WE-CAN 全球智能路由网络,为开发者提供毫秒级延时、多平台同步、高可靠高并发的直播服务。 集成网易云信播放器 SDK/NERTD 插件,实现毫秒级延时、稳定流畅的高质量直播场景。
MIT License
239 stars 39 forks source link

fix first-slice parsing with stap-a video frame #11

Open ArmstrongCN opened 1 year ago

ArmstrongCN commented 1 year ago

This PR mainly does tow things.

  1. fix the start_offset for H264BitstreamParser::IsFirstSliceInFrame while parsing with H264::NaluType::kIdr or H264::NaluType::kSlice in a stap-a packet.

In absl::optional ProcessStapAOrSingleNalu function, start_offset steps over nalu_type field.

start_offset += H264::kNaluTypeSize;

In H264BitstreamParser::IsFirstSliceInFrame, slice_reader steps over nalu_type field again.

  1. optimize the is_real_first_packet_in_frame assignment, remove duplicated bitstream parsing.