mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Merge branch '2.0release' into develop
This commit is contained in:
commit
17df61724d
1 changed files with 9 additions and 3 deletions
|
@ -1322,12 +1322,18 @@ int srs_write_h264_ipb_frame(Context* context,
|
|||
|
||||
// 5bits, 7.3.1 NAL unit syntax,
|
||||
// H.264-AVC-ISO_IEC_14496-10.pdf, page 44.
|
||||
// 7: SPS, 8: PPS, 5: I Frame, 1: P Frame
|
||||
SrsAvcNaluType nal_unit_type = (SrsAvcNaluType)(frame[0] & 0x1f);
|
||||
// 5: I Frame, 1: P/B Frame
|
||||
// @remark for rtmp, we only need to send the I/P/B frames to server,
|
||||
// the aud is used for server to remux stream to annexb.
|
||||
// TODO: FIXME: we must group NALUs between AUD to a frame.
|
||||
SrsAvcNaluType nut = (SrsAvcNaluType)(frame[0] & 0x1f);
|
||||
if (nut != SrsAvcNaluTypeIDR && nut != SrsAvcNaluTypeNonIDR) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
// for IDR frame, the frame is keyframe.
|
||||
SrsCodecVideoAVCFrame frame_type = SrsCodecVideoAVCFrameInterFrame;
|
||||
if (nal_unit_type == SrsAvcNaluTypeIDR) {
|
||||
if (nut == SrsAvcNaluTypeIDR) {
|
||||
frame_type = SrsCodecVideoAVCFrameKeyFrame;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue