winlin

Merge branch 'srs.master'

... ... @@ -244,6 +244,7 @@ Supported operating systems and hardware:
* 2013-10-17, Created.<br/>
## History
* v2.0, 2014-11-15, fix [#202](https://github.com/winlinvip/simple-rtmp-server/issues/202), fix memory leak of h.264 raw packet send in srs-librtmp. 2.0.20.
* v2.0, 2014-11-13, fix [#200](https://github.com/winlinvip/simple-rtmp-server/issues/200), deadloop when read/write 0 and ETIME. 2.0.16.
* v2.0, 2014-11-13, fix [#194](https://github.com/winlinvip/simple-rtmp-server/issues/194), writev multiple msgs, support 6k+ 250kbps clients. 2.0.15.
* v2.0, 2014-11-12, fix [#194](https://github.com/winlinvip/simple-rtmp-server/issues/194), optmized st for timeout recv. pulse to 500ms. 2.0.14.
... ...
... ... @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_REVISION 19
#define VERSION_REVISION 20
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
#define RTMP_SIG_SRS_ROLE "origin/edge server"
... ...
... ... @@ -1075,6 +1075,7 @@ char* srs_amf0_human_print(srs_amf0_t amf0, char** pdata, int* psize)
* write h264 packet, with rtmp header.
* @param frame_type, SrsCodecVideoAVCFrameKeyFrame or SrsCodecVideoAVCFrameInterFrame.
* @param avc_packet_type, SrsCodecVideoAVCTypeSequenceHeader or SrsCodecVideoAVCTypeNALU.
* @param h264_raw_data the h.264 raw data, user must free it.
*/
int __srs_write_h264_packet(Context* context,
int8_t frame_type, int8_t avc_packet_type,
... ... @@ -1142,6 +1143,7 @@ int __srs_write_h264_sps_pps(Context* context, u_int32_t dts, u_int32_t pts)
+ 3 + (int)context->h264_sps.length()
+ 3 + (int)context->h264_pps.length();
char* packet = new char[nb_packet];
SrsAutoFree(char, packet);
// use stream to generate the h264 packet.
SrsStream stream;
... ... @@ -1236,6 +1238,7 @@ int __srs_write_h264_ipb_frame(Context* context,
// NALUnit
int nb_packet = 4 + size;
char* packet = new char[nb_packet];
SrsAutoFree(char, packet);
// use stream to generate the h264 packet.
SrsStream stream;
... ...