h264 265 FU using wrong address
refer to live555 and use VLC play void H264or5Fragmenter::doGetNextFrame()
// case 2 if (fHNumber == 264) { fInputBuffer[0] = (fInputBuffer[1] & 0xE0) | 28; // FU indicator fInputBuffer[1] = 0x80 | (fInputBuffer[1] & 0x1F); // FU header (with S bit) } else { // 265 u_int8_t nal_unit_type = (fInputBuffer[1]&0x7E)>>1; fInputBuffer[0] = (fInputBuffer[1] & 0x81) | (49<<1); // Payload header (1st byte) fInputBuffer[1] = fInputBuffer[2]; // Payload header (2nd byte) fInputBuffer[2] = 0x80 | nal_unit_type; // FU header (with S bit) }
fInputBuffer[1] is nalu
FU_A[0] = (frame_buf[0] & 0xE0) | 28; FU_A[1] = 0x80 | (frame_buf[0] & 0x1F); frame_buf += 1; frame_size -= 1; &frame_buf[0] is not nalu value
////////////////////should FU_A[0] = (frame_buf[4] & 0xE0) | 28; FU_A[1] = 0x80 | (frame_buf[4] & 0x1F); frame_buf += 5; frame_size -= 5;