diff --git a/trunk/research/librtmp/srs_h264_raw_publish.c b/trunk/research/librtmp/srs_h264_raw_publish.c index 393fb3599..58a0aff74 100644 --- a/trunk/research/librtmp/srs_h264_raw_publish.c +++ b/trunk/research/librtmp/srs_h264_raw_publish.c @@ -181,11 +181,11 @@ int main(int argc, char** argv) // 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, 9: AUD + // 7: SPS, 8: PPS, 5: I Frame, 1: P Frame, 9: AUD, 6: SEI u_int8_t nut = (char)data[nb_start_code] & 0x1f; srs_human_trace("sent packet: type=%s, time=%d, size=%d, fps=%.2f, b[%d]=%#x(%s)", srs_human_flv_tag_type2string(SRS_RTMP_TYPE_VIDEO), dts, size, fps, nb_start_code, (char)data[nb_start_code], - (nut == 7? "SPS":(nut == 8? "PPS":(nut == 5? "I":(nut == 1? "P":(nut == 9? "AUD":"Unknown")))))); + (nut == 7? "SPS":(nut == 8? "PPS":(nut == 5? "I":(nut == 1? "P":(nut == 9? "AUD":(nut == 6? "SEI":"Unknown"))))))); // @remark, when use encode device, it not need to sleep. if (count == 10) { diff --git a/trunk/src/libs/srs_librtmp.cpp b/trunk/src/libs/srs_librtmp.cpp index 80567d2db..dcafcd70e 100644 --- a/trunk/src/libs/srs_librtmp.cpp +++ b/trunk/src/libs/srs_librtmp.cpp @@ -1323,9 +1323,10 @@ 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. // 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. + // @remark we already group sps/pps to sequence header frame; + // for I/P NALU, we send them in isolate frame, each NALU in a frame; + // for other NALU, for example, AUD/SEI, we just ignore them, because + // AUD used in annexb to split frame, while SEI generally we can ignore it. SrsAvcNaluType nut = (SrsAvcNaluType)(frame[0] & 0x1f); if (nut != SrsAvcNaluTypeIDR && nut != SrsAvcNaluTypeNonIDR) { return ret;