@@ -93,7 +93,7 @@ public int PayloadType
9393 /// Ctor.
9494 /// </summary>
9595 /// <param name="profileIdc">H264 Profile IDC. Default value is 77.</param>
96- /// <param name="profileIop">H264 Profile IOP. Default value is 0.</param>
96+ /// <param name="profileIop">H264 Profile IOP. Default value is 0. See https://www.rfc-editor.org/rfc/rfc6184#page-41. </param>
9797 /// <param name="level">H264 Level. Default value is 42.</param>
9898 /// <param name="clock">H264 clock. Default value is 90000.</param>
9999 public H264Track ( int profileIdc = 77 , int profileIop = 0 , int level = 42 , int clock = DEFAULT_CLOCK )
@@ -110,7 +110,7 @@ public H264Track(int profileIdc = 77, int profileIop = 0, int level = 42, int cl
110110 /// <param name="sps">Sequence Parameter Set (SPS).</param>
111111 /// <param name="pps">Picture Parameter Set (PPS).</param>
112112 /// <param name="profileIdc">H264 Profile IDC. Default value is 77.</param>
113- /// <param name="profileIop">H264 Profile IOP. Default value is 0.</param>
113+ /// <param name="profileIop">H264 Profile IOP. Default value is 0. See https://www.rfc-editor.org/rfc/rfc6184#page-41. </param>
114114 /// <param name="level">H264 Level. Default value is 42.</param>
115115 /// <param name="clock">H264 clock. Default value is 90000.</param>
116116 public H264Track ( byte [ ] sps , byte [ ] pps , int profileIdc = 77 , int profileIop = 0 , int level = 42 , int clock = DEFAULT_CLOCK ) : this ( profileIdc , profileIop , level , clock )
@@ -144,17 +144,13 @@ public StringBuilder BuildSDP(StringBuilder sdp)
144144 ProfileIop . ToString ( "X2" ) +
145145 Level . ToString ( "X2" ) ;
146146
147- // Make the Base64 SPS and PPS
148- // raw_sps has no 0x00 0x00 0x00 0x01 or 32 bit size header
149- // raw_pps has no 0x00 0x00 0x00 0x01 or 32 bit size header
150147 string spsStr = Convert . ToBase64String ( SPS ) ;
151148 string ppsStr = Convert . ToBase64String ( PPS ) ;
152149
153150 sdp . Append ( $ "m=video 0 RTP/AVP { PayloadType } \n ") ;
154151 sdp . Append ( $ "a=control:trackID={ ID } \n ") ;
155152 sdp . Append ( $ "a=rtpmap:{ PayloadType } { Codec } /{ VideoClock } \n ") ;
156- sdp . Append ( $ "a=fmtp:{ PayloadType } profile-level-id=") . Append ( profileLevelIdStr )
157- . Append ( "; sprop-parameter-sets=" ) . Append ( spsStr ) . Append ( ',' ) . Append ( ppsStr ) . Append ( "\n " ) ;
153+ sdp . Append ( $ "a=fmtp:{ PayloadType } profile-level-id={ profileLevelIdStr } ; sprop-parameter-sets={ spsStr } ,{ ppsStr } \n ") ;
158154 return sdp ;
159155 }
160156
0 commit comments